I think by now U must have already solved the problem
Any way what U can do is name all the checkbox with a different name and
receive it normally in yur servlet
like
arr[i] = req.getParameter(names[j]);
Nimesh
-----Original Message-----
From: Jeetandra Mahtani <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, June 28, 1999 8:10 AM
Subject: checkboxes and servlets
>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
>
___________________________________________________________________________
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