File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Valid JSP Parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Valid JSP Parameters" Watch "Valid JSP Parameters" New topic
Author

Valid JSP Parameters

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
I am tring to use the value of a checkbox from my JSP in my servlet as a parameter. I am having trouble with it and need help.

The following code is used in my servlet and wheather or not the checkbox is checked or not I get a blank value.

Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
Would you be more specific? Please provide the JSP code and the Servlet code to retrieve the parameter.

Thank you
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Did you really name your request object "arg0"?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

Originally posted by Ben Souther:
Did you really name your request object "arg0"?
That's how my IDE generates the parameter names when I tell it to create a servlet. But I always rename the parameters to "request" and "response" before I do anything else.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The following code is used in my servlet and wheather or not the checkbox is checked or not I get a blank value.

Is the value of the checkbox set ? Please post the HTML code of your checkbox.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Valid JSP Parameters
 
Similar Threads
Servlet and ajax
checkbox-once clicked-always sends the value as true
Display table row value in another form
Why is request.getParameterValues not working for me?
dynamic Checkboxe value retrieval