The error shown in the stacktrace is caused by the line,
.
The tag reads the form and populates the bean. If the form field contains a String and the bean field is an int, the NumberFormatException is thrown. If my
jsp form bean can only use Strings, then the usefulness of setting all properties with "*" is dimminished. Is there a way to catch bad input data using this example? I understand the suggestions posted, but, how can they be applied since the jsp:setProperty tag is causing the problem before I can run my error checking code?