tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elijah Roberts <erobe...@alexandriasc.com>
Subject Re: Tomcat and <SELECT MULTIPLE>
Date Thu, 11 May 2000 04:18:28 GMT
At Wednesday, 5/10/2000 10:40 PM, you wrote:
>     I've attached two files, the first of which is a form which calls
>the other, which just displays the parameters picked in the form. When I
>run this form with a competitors product (JRun) it returns a comma
>separated list of all of the elements that were selected in the <SELECT
>MULTIPLE> form field.  When I run it with Tomcat, only the first field
>is returned by a call to request.getParameter().

According to the Servlet API specification for the request.getParameter() 
method, located here:

http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletRequest.html#getParameter(java.lang.String)

the request.getParameter() method is only supposed to return the first 
value of a multi-valued parameter. If you need access to all of the values 
you should call request.getParameterValues() which will return a String 
array of the values.

Elijah Roberts
Java Consultant
eroberts@alexandriasc.com
606-816-1186


Mime
View raw message