I have a checkbox in my JSP page that accepts integer values:
Dangerous Checkbox
you can use JSTL's c:catch tag:
<c:catch var ="numberFormatException">
<form:checkbox path="somePath" value="blah" /> Dangerous Checkbox <br />
</c:catch>
<c:if test = "${numberFormatException!= null}">
<p>The exception is : ${numberFormatException} <br />
There is an exception: ${numberFormatException.message}</p>
</c:if>