Checkboxes can be associated to boolean attributes:
<l:inputCheckbox name="mortgage.starred"/>
Browsers do not send values for unchecked checkboxes, which would make it impossible to set a boolean value to false. To circumvent this, the generated HTML for the above code will look like this:
<input type="checkbox" name="mortgage.starred"/> <input type="hidden" value="false" name="mortgage.starred"/>
If the checkbox is not checked the underlying hidden value of "false" will be submitted anyway. This should be taken into consideration if you plan to do funny things with checkboxes and javascript.
A checkbox can also be bound to Set properties:
public class MortgagesAction extends AbstractAction {
/** list of selected items */
private Set selectedItems;
<ul>
<c:forEach var="item" items="${allItems}" >
<li><l:inputCheckbox name="selectedItems[${item}]" "/> Select item ${item.name}</li>
</c:forEach>
</ul>