You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vikkal_Gupta <Vi...@satyam.com> on 2000/09/27 07:13:56 UTC
Multiple option in HTML
> My HTML code is something like below.
>
> <FORM ACTION= "../examples/servlet/getRes" method=post>
> <table>
> <tr><td colspan=3 nowrap><font class="f" size=2><b>Name of
> the file to be processed</b></font></td>
> <td><input type="text" name="file" size="31"
> maxlength="60"></td></tr>
> <tr><td colspan=3 nowrap><font class="f" size=2><b>Select the
> Test Suite name(s)</b></font></td>
> <td>
> <SELECT NAME="testsuite" size=5 multiple>
> <OPTION VALUE="OLAPSAMP ">OLAPSAMP</OPTION>
> <OPTION VALUE="OLAPSTAT ">OLAPSTAT</OPTION>
> <OPTION VALUE="QLNT">QLNT</OPTION>
>
> </td><td></td>
> <td><input type="submit" name="enter" value="OK" ></td></tr>
> </table>
> </FORM>
>
>
> here since we have define multiple in the select tag , we can select
> multiple items from the list . But when after selecting multiple entries ,
> ok button is clicked and getRes servlet is called , it is taking only the
> first item . This is working fine on javawebserver i.e if you select
> multiple items , servlet is taking all the items which you have selected,
> but giving problem with Apache and Tomcat combination .
>
> Is this a known problem or i have to do some settings.
>
> Can anybody help?.
>
> Thanks
> vikkal
>
>
>
Re: Multiple option in HTML
Posted by William Brogden <wb...@bga.com>.
> Vikkal_Gupta wrote:
>
> My HTML code is something like below.
>
> <FORM ACTION= "../examples/servlet/getRes" method=post>
> <table>
> <tr><td colspan=3 nowrap><font class="f"
> size=2><b>Name of the file to be processed</b></font></td>
> <td><input type="text" name="file" size="31"
> maxlength="60"></td></tr>
> <tr><td colspan=3 nowrap><font class="f" size=2><b>Select
> the Test Suite name(s)</b></font></td>
> <td>
> <SELECT NAME="testsuite" size=5 multiple>
> <OPTION VALUE="OLAPSAMP ">OLAPSAMP</OPTION>
> <OPTION VALUE="OLAPSTAT ">OLAPSTAT</OPTION>
> <OPTION VALUE="QLNT">QLNT</OPTION>
>
> </td><td></td>
> <td><input type="submit" name="enter" value="OK"
> ></td></tr>
> </table>
> </FORM>
>
> here since we have define multiple in the select tag , we can select
> multiple items from the list . But when after selecting multiple
> entries , ok button is clicked and getRes servlet is called , it is
> taking only the first item . This is working fine on javawebserver
> i.e if you select multiple items , servlet is taking all the items
> which you have selected, but giving problem with Apache and Tomcat
> combination .
>
> Is this a known problem or i have to do some settings.
You should use the ServletRequest method
getParameterValues("testsuite")
for the possibly multiple choice parameter ^--- note
This returns a String[] with 0, 1 or many Strings
--
WBB - wbrogden@bga.com Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam
at http://www.lanw.com/java/javacert/