You should be using request.getParameterValues("template") to get multiple
values of the same field...the same applies to multiple selection (drop
down) box also.. 

so, after submitting the form...to get the value(s) of the field, you should
be using the above mentioned...it will give you an array of Strings........
(in your case, it will give you the values of all *checked checkboxes only*)

String [] myVal;
myVal = request.getParameterValues("template");

this should help you.

regards,
Chintan

-----Original Message-----
From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 2:02 AM
To: [EMAIL PROTECTED]
Subject: Does tomcat 3.2.1 handle checkboxes properly?


I have a form that submits information to a bean.

When this page is a *.jsp form, checkboxes with the sam name and different
values do not return like they should.  If I have...
<input type=checkbox value=temp2 name=template>
<input type=checkbox value=temp3 name=template>

I should get template = temp2, temp3 when they are submitted.

This works properly when the page is *.html and the request is processed by
Apache, but does not work properly when the request is *.jsp and processed
by tomcat 3.2.1.

Anyone know how to get around this problem?

Thanks!

Brandon

Reply via email to