They will be ignored but the will still be visible in the HTML received by the browser, it is therefore much better to use JSP comments <%-- --%>
-----Original Message----- From: Jaye Bass [mailto:[EMAIL PROTECTED] Sent: 04 March, 2003 13:24 To: 'Struts Users Mailing List' Subject: RE: Struts not parsing HTML correctly? Actually, you can use html comments to remove tags you just have to embed them in the tag...thusly: <!--bean:write name="foobar" property="nothing"--> That will be ignored by the container, browser and everything else. -----Original Message----- From: Thomas CORNET [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 3:04 AM To: Struts Users Mailing List Subject: Re: Struts not parsing HTML correctly? At 09:51 04/03/2003, you wrote: >There are actually 2 problems I'm experiencing: > >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. Struts doesn't care of HTML comments, all the JSP source is processed to produce HTML content, and that's the navigator which is checking HTML comments to display contents or not. >The second problem is that I actually DO have a getter (and setter) method >for >contractUser in UserForm.java: > > /* Contract User */ > private boolean contractUser = false; > public boolean getContractUser() { > return this.contractUser; > } > public void setContractUser(boolean contractUser) { > this.contractUser = contractUser; > } > > >I have the following in my struts config: > ><struts-config> > <form-beans> >... > <form-bean name="userForm" > type="com.somewhere.aproject.UserForm" /> >... > </form-beans> > <action-mappings> >... > <action path="/screen_user_add" > forward="/user_add.jsp" > name="userForm" > validate="false"/> >... > </action-mappings> ></struts-config> > > >I know the configuration is right since the rest of the fields work fine. >Should I be using type String instead of boolean for contractUser? I've read somewhere that all forms fields should be declared as String in the Form classes... It is recommended to make the conversions in your actions classes. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. ______________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]