Actually...  with a MULTIPLE select box, you will need to use a
StringTokenizer, since the parameter value will be a comma separated
list of all select options...

for (Enumeration p = request.getParameterNames() ; p.hasMoreElements()
;) {
   name = p.nextElement().toString() ;
   value = req.getParameter(name) ;
   if(name.equals("NAME")) {
      st = new StringTokenizer(value, ",");
      while (st.hasMoreTokens()) {
         // do something with each token.
         System.err.println(st.nextToken());
      }
   }
}

Hope that helps!

Cj



Antonio Jimenez wrote:
>
> in a multiple select
>
>     <select multiple name="NAME" size="5">
>         <option value="1">value 1</option>
>         ...
>     </select>
>
> you can use
>
>         for (Enumeration p = request.getParameterNames() ; p.hasMoreElements() ;) {
>             name = p.nextElement().toString() ;
>             value = req.getParameter(name) ;
>             ...
>         }
>
> "Anna Sp�ngberg" wrote:
> >
> > How do i get
> >
> > multiple values from a select menu with request.getParameter ?
> >
> > thanks
> >
> > anna
> >
> > ===========================================================================
> > 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
>
> --
> Antonio Jimenez Alfaro
> Departamento Tecnico
> -------------------------------------------------------------
> Internet Systems S.A.             mailto:[EMAIL PROTECTED]
> Doctor Esquerdo, 10 4� planta     http://www.intersys.es
> 28028 MADRID                      Tel. +34 914.013.325
> SPAIN                             Fax  +34 914.015.689
> -------------------------------------------------------------
>
> ===========================================================================
> 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

--
Corey A. Johnson
President/Director of Technology
Creative Network Innovations, Inc.
1-800-264-5547 ** 1-407-259-1984

===========================================================================
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