您可以使用JSTL的
c:catch
标签:
<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>


