Dderry <[EMAIL PROTECTED]> wrote : > Do you have an Action Mapping for saveExtraPersonDetails.do?
Yes: <action path="/saveExtraPersonDetails" type="com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPostAction" name="addExtraPersonDetailsForm" scope="session" input="/ExtraCustomerDetails.jsp"> <forward name="success" path="addJointHirer.do"/> </action> but it doesn't even display the page, so it doesn't get that far. >Does it use also use addExtraPersonDetailsForm? Yes, see above. >Do you have a <type="package.addExtraPersonDetailsForm"/>......... >entry in struts-config.xml? Yes: <form-bean name="addExtraPersonDetailsForm" type="com.pancredit.tkbespoke.tjs.strutstest.form.AddExtraPersonDetailsForm"/> > It appears to me that the addExtraPersonDetailsForm is not being used since > the error msg states that org.apache.struts.taglib.html.BEAN has no getter > method for dob. I thought that too, but if I put the error handling back in, it finds it. That suggests to me that it is using the right form bean. But if it is, then why doesn't it work.... What is org.apache.struts.taglib.html.BEAN actually referring to? Tim. > > ----- Original Message ----- > From: "Tim Sawyer" &lang=en">[EMAIL PROTECTED]> > To: &lang=en">[EMAIL PROTECTED]> > Sent: Monday, February 25, 2002 10:41 AM > Subject: Form Bean problem > > > > Hello. > > > > I'm calling a JSP page as the successful outcome of an action, and it's > complaining that one of my get methods doesn't exist. I can't work out > what's going on, can someone give me a nudge in the right direction? > > > > The page contains a form, for entering date of birth and marital status > (for now, I'm still messing with a test project). If I define no form bean > for this action, I get an error saying it can't find the getter method. If > I define the form bean and leave the Validate() method checking for nulls, I > get validation errors (correctly). If I remove the validation code, then I > get the getter method not found error again. Surely I shouldn't have to > define the form bean at all? > > > > Is there any reference to the flow of methods called between a call to a > do and displaying a success JSP anywhere? > > > > --------------Action Mapping------------------------------------------ > > > > > > > type="com.pancredit.tkbespoke.tjs.strutstest.action.AddExtraPersonDetailsPre > Action" > > name="addExtraPersonDetailsForm" > > scope="session" > > input="/AddFindParty/FindPartyResults.jsp"> > > > > > > ----------------ExtraCustomerDetails.JSP ------------------ > > > > > > > > > > > > > > Untitled Document > > > > > > > > Please enter the following customer details: > > > > > > > > > > Date of Birth: > > > > > > > > Marital status: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----------------Form > Bean---------------------------------------------------------------------- > > public class AddExtraPersonDetailsForm extends AbstractActionForm > > { > > private String dob = null; > > private String maritalStatusID = null; > > > > > > /** Creates a new instance of Class */ > > public AddExtraPersonDetailsForm() > > { > > } > > > > > > /** Getter for property maritalStatusID. > > * @return Value of property maritalStatusID. > > */ > > public java.lang.String getMaritalStatusID() > > { > > return maritalStatusID; > > } > > > > /** Setter for property maritalStatusID. > > * @param maritalStatusID New value of property maritalStatusID. > > */ > > public void setMaritalStatusID(java.lang.String maritalStatusID) > > { > > this.maritalStatusID = maritalStatusID; > > } > > > > /** This method is called when the user submits the form. It should > validate the > > * data that has been entered for mandatory variables etc. > > */ > > protected ActionErrors onValidate(ActionMapping mapping, > HttpServletRequest request) > > { > > ActionErrors lErrors = new ActionErrors(); > > > > // this.checkMandatory(lErrors, this.dob, "dob", > "addFindPartyModule.errors.dobMissing"); > > // this.checkMandatory(lErrors, this.maritalStatusID, > "maritalStatusID", "addFindPartyModule.errors.maritalStatusIDMissing"); > > > > return lErrors; > > } > > > > /** This method is called when the user pushes the Reset button on the > form. > > * It should assign all of the fields on the form null. > > */ > > protected void onReset(ActionMapping mapping, HttpServletRequest > request) > > { > > // this.dob = null; > > // this.maritalStatusID = null; > > } > > > > /** Getter for property dob. > > * @return Value of property dob. > > */ > > public java.lang.String getDob() > > { > > return dob; > > } > > > > /** Setter for property dob. > > * @param dob New value of property dob. > > */ > > public void setDob(java.lang.String dob) > > { > > this.dob = dob; > > } > > > > --------------Top of Error > stack-------------------------------------------------------------- > > > > javax.servlet.jsp.JspException: No getter method for property dob of bean > org.apache.struts.taglib.html.BEAN > > at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517) > > at > org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188) > > at > /ExtraCustomerDetails.jsp._jspService(/ExtraCustomerDetails.jsp.java:70) > (JSP page line 17) > > at com.orionserver[Orion/1.5.2 (build > 10460)].http.OrionHttpJspPage.service(Unknown Source) > > > > > > cheers, > > > > Tim. > > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > &lang=en">[EMAIL PROTECTED]> > > For additional commands, e-mail: > &lang=en">[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>