hi.
I am having a problem setting values on a bean between two different
pages usings BEA Weblogic's JSP engine.

The index.jsp file is a search page (to get the right values)
In the setAction() method of the bean it well set up all the right
values for the rest of the fields (this is where I'll be putting
my DB/Tuxedo message call)

I enter a account # press the search (on index.jsp), and the values of
the fields should appear on the accountMain.jsp

Any Ideas, besides from continuing to use servletExec ;-)

ps. Under servletExec 2.2 this works fine.

Ian.
package com.splwg.cis.bean;

import java.util.*;
/**
 * Message Bean used to display a one line message at the bottom of the screen
 * Creation date: (10/26/1999 12:23:09 PM)
 * @author: Ian Holsman
 */

public class Message {
        private String fieldMessage = new String();
        private String fieldMessageType = new String();

/**
 * Message constructor comment.
 */
public Message() {
        super();
        setMessage("None","No Message");
}
        public void setMessage( String Type, String message) {
                fieldMessageType = Type;
                fieldMessage = message;
        }
        public String getMessage()
        {
                return fieldMessage;
        }
        public String getMessageType()
        {
                return fieldMessageType;
        }
}
package com.splwg.cis.bean;

import java.util.*;
import java.text.*;

/**
 * Account Bean
 * Creation date: (10/26/1999 12:23:09 PM)
 * @author: Ian Holsman
 */
public class Account {
        private String fieldAccountID = new String();
        private java.util.Date fieldSetUpDate = new java.util.Date();
        private String fieldAlert = new String();
        private String fieldAlertInformation = new String();
        private String fieldCustomerClassCode = new String();
        private String fieldCollectionClassCode = new String();
        private java.util.Date fieldCreditCollectionReviewDate = new java.util.Date();
        private String fieldBillCycleCode = new String();
        private boolean fieldProtectBillCycleFlag = false;
        private java.util.Date fieldBillAfter = new java.util.Date();
        private String fieldBillPrintInterceptCode = new String();
        private boolean fieldProtectMailingPremiseFlag = false;

        private Message fieldMessage = new Message();
/**
 * Account constructor comment.
 */
public Account() {
        super();
}
public void setUpdateAccount( String s )
{
        /* This is where the update would occur */
        this.getMessage().setMessage("Info","Update Not Implemented");
}
public void setAction( String s )
{
        if ( s.equalsIgnoreCase("SearchByAccountID") )
        {
//              try {
                        Date rightNow =  new Date();
                        setAlert("This is a ALERT!");
                        setAlertInformation("This is ALERT Information");
                        setBillAfter( rightNow );
                        setBillCycleCode("Q-W1");
                        setBillPrintInterceptCode("");
                        setCollectionClassCode("RESID");
                        setCreditCollectionReviewDate(rightNow);
                        setCustomerClassCode("R");
                        setProtectBillCycleFlag(false);
                        setProtectMailingPremiseFlag(false);
                        setSetUpDate( rightNow );
                        this.getMessage().setMessage("None","Search Returned 1 Row");
/*              } catch (ParseException e) {
                        this.getMessage().setMessage("Error","Error In Parsing 
Information");
                }
*/
        }
        else {
                        this.getMessage().setMessage("Info","s");
        }
                setAlert(s);
}

/**
 *
 */
public Message getMessage() {
        return fieldMessage;
}
/* Following are just the getters/setters */
/**
 * Gets the accountID property (java.lang.String) value.
 * @return The accountID property value.
 * @see #setAccountID
 */
public String getAccountID() {
        return fieldAccountID;
}
/**
 * Gets the alert property (java.lang.String) value.
 * @return The alert property value.
 * @see #setAlert
 */
public String getAlert() {
        return fieldAlert;
}
/**
 * Gets the alertInformation property (java.lang.String) value.
 * @return The alertInformation property value.
 * @see #setAlertInformation
 */
public String getAlertInformation() {
        return fieldAlertInformation;
}
/**
 * Gets the billAfter property (java.util.Date) value.
 * @return The billAfter property value.
 * @see #setBillAfter
 */
public java.util.Date getBillAfter() {
        return fieldBillAfter;
}
/**
 * Gets the billCycleCode property (java.lang.String) value.
 * @return The billCycleCode property value.
 * @see #setBillCycleCode
 */
public String getBillCycleCode() {
        return fieldBillCycleCode;
}
/**
 * Gets the billPrintInterceptCode property (java.lang.String) value.
 * @return The billPrintInterceptCode property value.
 * @see #setBillPrintInterceptCode
 */
public String getBillPrintInterceptCode() {
        return fieldBillPrintInterceptCode;
}
/**
 * Gets the collectionClassCode property (java.lang.String) value.
 * @return The collectionClassCode property value.
 * @see #setCollectionClassCode
 */
public String getCollectionClassCode() {
        return fieldCollectionClassCode;
}
/**
 * Gets the creditCollectionReviewDate property (java.util.Date) value.
 * @return The creditCollectionReviewDate property value.
 * @see #setCreditCollectionReviewDate
 */
public java.util.Date getCreditCollectionReviewDate() {
        return fieldCreditCollectionReviewDate;
}
/**
 * Gets the customerClassCode property (java.lang.String) value.
 * @return The customerClassCode property value.
 * @see #setCustomerClassCode
 */
public String getCustomerClassCode() {
        return fieldCustomerClassCode;
}
/**
 * Perform the getMainPersonName method.
 * @return java.lang.String
 */
public String getMainPersonName() {
        /* Perform the getMainPersonName method. */
        return "Sawyer, Mike";
}
/**
 * Gets the protectBillCycleFlag property (boolean) value.
 * @return The protectBillCycleFlag property value.
 * @see #setProtectBillCycleFlag
 */
public boolean getProtectBillCycleFlag() {
        return fieldProtectBillCycleFlag;
}
/**
 * Gets the protectMailingPremiseFlag property (boolean) value.
 * @return The protectMailingPremiseFlag property value.
 * @see #setProtectMailingPremiseFlag
 */
public boolean getProtectMailingPremiseFlag() {
        return fieldProtectMailingPremiseFlag;
}
/**
 * Gets the setUpDate property (java.util.Date) value.
 * @return The setUpDate property value.
 * @see #setSetUpDate
 */
public java.util.Date getSetUpDate() {
        return fieldSetUpDate;
}
/**
 * Sets the accountID property (java.lang.String) value.
 * @param accountID The new value for the property.
 * @see #getAccountID
 */
public void setAccountID(String accountID) {
        fieldAccountID = accountID;
}
/**
 * Sets the alert property (java.lang.String) value.
 * @param alert The new value for the property.
 * @see #getAlert
 */
public void setAlert(String alert) {
        fieldAlert = alert;
}
/**
 * Sets the alertInformation property (java.lang.String) value.
 * @param alertInformation The new value for the property.
 * @see #getAlertInformation
 */
public void setAlertInformation(String alertInformation) {
        fieldAlertInformation = alertInformation;
}
/**
 * Sets the billAfter property (java.util.Date) value.
 * @param billAfter The new value for the property.
 * @see #getBillAfter
 */
public void setBillAfter(java.util.Date billAfter) {
        fieldBillAfter = billAfter;
}
/**
 * Sets the billCycleCode property (java.lang.String) value.
 * @param billCycleCode The new value for the property.
 * @see #getBillCycleCode
 */
public void setBillCycleCode(String billCycleCode) {
        fieldBillCycleCode = billCycleCode;
}
/**
 * Sets the billPrintInterceptCode property (java.lang.String) value.
 * @param billPrintInterceptCode The new value for the property.
 * @see #getBillPrintInterceptCode
 */
public void setBillPrintInterceptCode(String billPrintInterceptCode) {
        fieldBillPrintInterceptCode = billPrintInterceptCode;
}
/**
 * Sets the collectionClassCode property (java.lang.String) value.
 * @param collectionClassCode The new value for the property.
 * @see #getCollectionClassCode
 */
public void setCollectionClassCode(String collectionClassCode) {
        fieldCollectionClassCode = collectionClassCode;
}
/**
 * Sets the creditCollectionReviewDate property (java.util.Date) value.
 * @param creditCollectionReviewDate The new value for the property.
 * @see #getCreditCollectionReviewDate
 */
public void setCreditCollectionReviewDate(java.util.Date creditCollectionReviewDate) {
        fieldCreditCollectionReviewDate = creditCollectionReviewDate;
}
/**
 * Sets the customerClassCode property (java.lang.String) value.
 * @param customerClassCode The new value for the property.
 * @see #getCustomerClassCode
 */
public void setCustomerClassCode(String customerClassCode) {
        fieldCustomerClassCode = customerClassCode;
}
/**
 * Sets the protectBillCycleFlag property (boolean) value.
 * @param protectBillCycleFlag The new value for the property.
 * @see #getProtectBillCycleFlag
 */
public void setProtectBillCycleFlag(boolean protectBillCycleFlag) {
        fieldProtectBillCycleFlag = protectBillCycleFlag;
}
/**
 * Sets the protectMailingPremiseFlag property (boolean) value.
 * @param protectMailingPremiseFlag The new value for the property.
 * @see #getProtectMailingPremiseFlag
 */
public void setProtectMailingPremiseFlag(boolean protectMailingPremiseFlag) {
        fieldProtectMailingPremiseFlag = protectMailingPremiseFlag;
}
/**
 * Sets the setUpDate property (java.util.Date) value.
 * @param setUpDate The new value for the property.
 * @see #getSetUpDate
 */
public void setSetUpDate(java.util.Date setUpDate) {
        fieldSetUpDate = setUpDate;
}
public String getSetUpDateStr() {
        DateFormat df = DateFormat.getDateInstance();
        return df.format(getSetUpDate());
}
public void setSetUpDateStr(String setUpDate) throws ParseException {
        DateFormat df = DateFormat.getDateInstance();
        fieldSetUpDate = df.parse(setUpDate);
}
}
<%@ page isThreadSafe="false" import="java.text.DateFormat,com.splwg.cis.bean.Message" errorPage="error.jsp" %> <%= request.getHeader("Accept-Language") %> <% /*Locale l = this.getRequest().getLocale(); */ DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT); Message message = account.getMessage(); %>
Set Up Date:
Alert:
Alert Information:
<% String messageType = message.getMessageType(); if ( messageType == "Error" ) { %> Error! - <%= message.getMessage() %> <% } else if ( messageType == "Warning" ) { %> Warning! - <%= message.getMessage() %> <% } else if ( messageType == "Info" ) { %> <%= message.getMessage() %> <% } else if ( messageType == "None") { %> <% } else { %> ??? - <%= message.getMessage() %> <% } %>
Title: Error!
<%@ page isErrorPage="true" import="java.util.*" %>

CIS Application Error Page

An unexpected event occured in the application.
Please eMail the Following to the system-admin.

The name of the exception is <%= exception %>.

<%
    ByteArrayOutputStream ostr = new ByteArrayOutputStream();
    exception.printStackTrace(new PrintStream(ostr));
    out.print(ostr);
%>
Thank you.

Title: Account Search Page
<%@ page errorPage="error.jsp" %>
CurrentVal: <%= account.getAccountID() %>
Account ID

Reply via email to