Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getParameter returning null even though checkbox is checked!

843836Sep 2 2003 — edited Sep 2 2003
I did search for help in other threads, but my problem is still unresolved. My JSP has a form, and when it's submitted, some JSP code at the top of the page handles it with this:

if(request.getMethod().equalsIgnoreCase("POST")) {

etc, etc.

Most of the form fields are being extracted on the back end in a bean, but now I need to add a checkbox to see which bean to use, so I'm trying to do it in the JSP right after the code above:

if(request.getMethod().equalsIgnoreCase("POST")) {
String saveAddrString = request.getParameter("saveaddresses");
out.println("saveaddresses is " + saveAddrString);

etc, etc.
The checkbox HTML code looks like this:

<td>Check this box to save them: <input type='checkbox' name='saveaddresses' value='yes'></td>


The println statement above says that saveAddrString is null even when I check the box! How could this be?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2003
Added on Sep 2 2003
16 comments
692 views