You could try using getParameterValues.  This would give you an array of
Strings for all the values of B.

B:<%String b[] = request.getParameterValues("b");
for(int i=0;i<b.length;i++)
    out.print(b[i]);%>

I'm not saying this would work definatly cause I'm using Tomcat without Apache
and Linux, but it works on my system.

On Thu, 15 Jun 2000, you wrote:
> First post for me...  We're running Apache 1.3.12 with Tomcat 3.1 for
> servlets/JSP.  And unfortunately, our development box is NT.  There is
> something strange happening with form submissions - particularly with
> multiple select boxes.  Here is a piece of HTML with a form that submits to
> a JSP that prints out the results with request.getParameter().
>
> test.html:
> <HTML>
> <BODY>
> <FORM method="post" action="process.jsp">
> <SELECT name="b" multiple>
> <OPTION name="b1">1</OPTION>
> <OPTION name="b2">2</OPTION>
> <OPTION name="b3">3</OPTION>
> </SELECT>
> <INPUT TYPE=submit>
> </FORM>
> </BODY>
> <HTML>
>
> process.jsp:
> B:<%
> out.println(request.getParameter("b"));
> %>
>
>
> Look folks, it doesn't get any easier than this!  The problem is that
> whenever I select more than one item in the select, getParameter reports
> only one.  This exact piece of code works on our old JavaWebServer 2.0
> server.  What gives?  The production box will run Solaris 2.7 with Apache
> and Tomcat as well, but is still being put together so I can't test it
> there.  Is this just shoddy NT implementation of Apache/Tomcat ?  Any ideas
> would be very helpful.
>
> Dave
>
> Dave Gillies
> Web Programmer
> Learning Technologies Unit
> E230-1970 Ness Avenue
> Phone: (204) 945-7497
> Fax: (204) 945-1704
> EMail: [EMAIL PROTECTED]
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
--

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to