Maybe you aren't using the mapping you think you are? I can' think why it would look for a getter if no form is specified. Suggestions:- 1 - put debug message in constructor of your formBean & in reset - to prove it's being used. 2 - In Action classes perform method print form.getClass().getName() - to see which form bean you are using. 3 - Try to call the get method from the jsp with <bean:write property=dateOfBirth" /> 4 - try to call it from a scriptlet? 5 - Give up & drink 5 pints of Samel Smith's Museum Ale. Then notice you accidentally had your property methods declared private.
>> I don't need to use an action form at all with this page. You do if you have a form on the page don't you? Good luck.. --- Tim Sawyer <[EMAIL PROTECTED]> wrote: > I've just been messing with that. I've renamed the property to dateOfBirth > and implemented getDateOfBirth() and setDateOfBirth() and it's still > complaining, only now it can't find the getter method for > dateOfBirth. > > I'm certain it's using the right form bean, as I get validation errors if I > check for null in the validate() method. If I take the validation out I get > this error. > > I don't need to use an action form at all with this page. It's basically > just a data input form. Why is it trying to run a get method? If I take the > form out of the mapping for this do in the struts-config, I get the same > error. But seeing as I then don't have a form at all for this action, why is > it still trying to run get? > > What's the logic for populating forms with values that are already in the > form bean? And what should it do if there is no form bean? How does it tell > if there is a form bean or not? On second thoughts, I'd better have a look > at the code - can someone point out where this is in the struts code please? > > Cheers, > > Tim. > > KeithBacon <[EMAIL PROTECTED]> wrote : > > > Have you got other properties on the same form/jsp working OK? (to prove > you > > are looking at the right form bean). > > > > As a wild desperate measure - try adding another word so it is dobTest > > (getDobTest). Properties are weird when they start with multiple uppercase > > letters maybe when it's all lower case. > > > > I know this is no use but I wish I could help... I went through something > > similar where it seemed to be allergic to my property name &* I know it > > wasn't > > a spelling error. Good luck! > > > > --- Tim Sawyer &lang=en">[EMAIL PROTECTED]> > > wrote: > > > Thanks to everyone for your suggestions. > > > > > > JSP property looks like this: > > > > > > > > > > > > Get and set methods look like this: > > > > > > /** 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; > > > } > > > > > > This should work shouldn't it? I assume I'm missing something obvious, > > but > > > don't really know where to look. > > > > > > Tim. > > > > > > > > > > > > Jean-Guillaume LALANNE &lang=en">[EMAIL PROTECTED]> > > wrote : > > > > > > > Hi, > > > > > > > > I have got the same type of problem and it was due to the fact that my > > > > property was not lowercase... > > > > Have a look at your JSP and specially to your "dob" property ... > > > > > > > > Hope that helps > > > > > > > > Jean-Guillaume LALANNE > > > > > > > > ----- Original Message ----- > > > > From: "Tim Sawyer" &lang=en">&lang=en">[EMAIL PROTECTED]> > > > > To: &lang=en">&lang=en">[EMAIL PROTECTED]> > > > > Cc: "Tim Sawyer" ;&lang=en">;&lang=en">[EMAIL PROTECTED]>; > > > > &lang=en">&lang=en">[EMAIL PROTECTED]> > > > > Sent: Tuesday, February 26, 2002 11:50 AM > > > > Subject: Re: Form Bean problem > > > > > > > > > > > > > Nope, same error. It seems to be in the html library somewhere. > > > > > > > > > > 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:64) > > > > (JSP page line 16) > > > > > at com.orionserver[Orion/1.5.2 (build > > > > 10460)].http.OrionHttpJspPage.service(Unknown Source) > > > > > at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source) > > > > > > > > > > Is this something obvious I've done wrong? > > > > > > > > > > Tim. > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Sarah Farrell [mailto:[EMAIL PROTECTED]] > > > > > Sent: Monday, February 25, 2002 9:54 PM > > > > > To: Struts Users Mailing List > > > > > Subject: Re: Form Bean problem > > > > > > > > > > > > > > > The error sounds like it is referring to the taglib struts-bean.tld, > > > > whether > > > > > or > > > > > not it is a legitimate error, I'm not sure. > > > > > > > > > > Try taking out the line > > > > > > > > > > from your jsp and change the button tags back to regular HTML where > > > > > > > > > > > > > > > > > > > > would become > > > > > > > > > > and > > > > > > > > > > > > > > > > > > > > would become > > > > > > > > > > > > > > > And then tell us if you get the same error message, or a different > > one. > > > > > > > > > > ?? > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > To unsubscribe, e-mail: > > > > &lang=en">&lang=en">[EMAIL PROTECTED]> > > > > > For additional commands, e-mail: > > > > &lang=en">&lang=en">[EMAIL PROTECTED]> > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: > > > &lang=en">&lang=en">[EMAIL PROTECTED]> > > > > For additional commands, e-mail: > > > &lang=en">&lang=en">[EMAIL PROTECTED]> > > > > > > > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: > &lang=en">[EMAIL PROTECTED]> > > > For additional commands, e-mail: > &lang=en">[EMAIL PROTECTED]> > > > > > > > > > ===== > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Search the archive:- > > http://www.mail-archive.com/struts-user%40jakarta.apache.org/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Keith Bacon - Looking for struts work - South-East UK. > > phone UK 07960 011275 > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Sports - Coverage of the 2002 Olympic Games > > http://sports.yahoo.com > > > > -- > > 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]> > ===== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Search the archive:- http://www.mail-archive.com/struts-user%40jakarta.apache.org/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Keith Bacon - Looking for struts work - South-East UK. phone UK 07960 011275 __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>