Hello,
I have a form with several checkboxes. Now, the action of this form is a servet, in 
which I
need to see if the checkboxes have been selected. Until now, I have using the 
following to
retrieve values from a form:
String opt3 = req.getParameterValues("opt3")[0];

The html for a checkbox is:
<input type="checkbox" name="opt1" value="ON">Add a Complaint<br>

If I retrieve opt1 by
String opt1 = req.getParameterValues("opt1")[0];
I get a nullpointer exception.

Any way by which I could check if a checkbox is selected and retrieve the value?
Thanks,
Jeetandra

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to