struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <nicolas.del...@cgey.com>
Subject Re: Struts not parsing HTML correctly?
Date Tue, 04 Mar 2003 08:58:47 GMT

>
> Firstly, I have the following snippet in one of my forms (user_add.jsp):
>
>                     <!-- tr>
>                         <th>Contract User</th>
>                         <td>
>                             <html:checkbox property="contractUser"/>
>                         </td>
>                     </tr -->
>
> If this is present, struts fails with the following error:
>
> org.apache.jasper.JasperException: No getter method for property
contractUser
> of bean org.apache.struts.taglib.html.BEAN
>
> This happens whether that section is commented out or not, but does not
occur
> if I remove the code entirely.
>

As "<!-- -->" is HTML comment, it will not change the way jour JSP compiler
handles custom tags.


> The second problem is that I actually DO have a getter (and setter) method
for
> contractUser in UserForm.java

Yout <html:checkbox> is looking for a getter method for property
contractUser (String getContractUser()) of the current formBean defined by a
parent <html:form>.

How are you using <html:fom> tag in your JSP ? Is the declared action path
associated with the correct ActionFormBean in struts-config ?

Nico.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message