File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Problem with html:checkbox tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with html:checkbox tag" Watch "Problem with html:checkbox tag" New topic

Problem with html:checkbox tag

Manu Ramakrishnan

Joined: Jun 07, 2003
Posts: 10
Can anybody help me in this ?
If struts checkbox tag is not checked what will be the value returned ? The mutator methods of the Form Bean is not getting invoked. Can I specify an unchecked value for this tag ?
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
The problem is that the checkbox field is not submitted when it is not checked. As a workaround you can set the value of your checkbox to false
in the reset method of the form.
On the Struts FAQ page this workaround is explained in detail. You can find details here
I agree. Here's the link:
subject: Problem with html:checkbox tag
It's not a secret anymore!