Troubleshooting

Form and Form Variable Names

Q1:I clicked the Submit button, but the form won't load.
Aside from the obvious spelling errors in the action attribute of the <FORM>, you must also make sure that the capitalization action attribute matches the name of the form JSP. Even if you are running under Windows, Java is case sensitive, so you can run into problems if you try to invoke a JSP using capitalization that is different from the actual filename.
Q2:My form variable values are null.
Usually the reason you can't get the value of a form variable is because the name of the variable in the form doesn't exactly match the name you use in the getParameter method, either because of a spelling difference or a capitalization difference.

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.