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!

Checkbox and request.getParameter ()

843835Jul 1 2003 — edited Sep 6 2005
I've not done much with JSP, so forgive me if I'm missing something obvious.

I have a checkbox on a .jsp page, and I'd like to get the value of the checkbox and do something else accordingly. I've searched the forums, and it looks to me that it should be as easy as:
<form>
<input type="checkbox" tabindex="<%= ServletHelper.getNextTabIndex( request ) %>" id="Some_ID" name="Some_Name"/>
</form>
and
String testRequest = request.getParameter( "Some_Name" );
Abbreviated code, of course. :)

testRequest always comes back as null. I've tried setting the value in the checkbox to a .jsp variable, a local variable and not including it at all, but I don't think that's the issue. I've inherited this code, and there's another input form to upload a file, which is gathered in the jsp via MultiPartData. Could that be causing the issue? I looked through the 1.2/3/4 API docs and couldn't find info on the MultiPartData object, nor could I find the getParameter() method for javax.servlet.http.HttpServletRequest. Any help would be most appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2005
Added on Jul 1 2003
16 comments
2,424 views