Thanks to Robert and Pete for your help. Guess I should get with the
times...
Dave
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.
> -----Original Message-----
> From: ryoung [SMTP:[EMAIL PROTECTED]]
> Sent: 2000-Jun-15 9:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Tomcat wierdness
>
> in the servlet 2.0 spec, return is said to be server
> dependent.
>
> in the servlet 2.1 spec, return is to be the first
> parameter, if
> an array is found.
>
> haven't reviewed the 2.2 spec, but i would guess it's the
> same as
> 2.1.
>
> replacing with getParameterValues("b") should fix the
> problem.
>
> robert young
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Gillies,
> David (EDU)
> Sent: Thursday, June 15, 2000 9:12 AM
> To: [EMAIL PROTECTED]
> Subject: Tomcat wierdness
>
>
> 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
===========================================================================
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