Got the solution : the problem was that my HTML select object was not
defined as MULTIPLE.
Concerning the length you can get it as an attribute and not as a method
of the String array(.length instead of .length()).
David Maciejowski wrote:
>
> I encounter problem in using the HttpServletRequest.getParameterValues()
> method to get all of the selected options of an HTML select object.
> The problem is that I only get the last selected value of the combo, not
> all of them.
> Have you already encounter this problem ?
>
> Moreover, at compilation time, the lAux2 String array is not recognized
> as a String array but as an Object. Here is the code:
>
> String[] lAux2 = req.getParameterValues("SELECTED_CAT");
> System.out.println("Nb of parameters=" + lAux2.length());
>
> The compilation error:
> SubmitFormServlet.java:116: Method length() not found in class
> java.lang.Object.
>
> System.out.println("Nb of parameters=" + lAux2.length());
>
> Any idea ??
>
> Note: I use the JRun servlet engine.
>
> David
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html