On Thu, 5 Apr 2001, Sreedhar wrote:

> hey
>
> with the help of below method , i think u can retreive all the possible
> values of the passed parameter name(even if it has onnly one value!).
>  public abstract String[]
> javax.servlet.ServletRequest.getParameterValues(String name);

And with spec 2.2 (I think that's the first one where it's true),
getParameter() is guaranteed to return the first value in the array
getParameterValues() returns.


> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 05, 2001 12:55 PM
> To: [EMAIL PROTECTED]
> Subject: Another prob?
>
> How do i get all the values of String AA and executes the "else"
> part if it happens that there are more than 1 value??
>
> ******************************************
> String AA=request.getParameter("PEOPLE");
> String p=request.getParameter("Name");
> if(!p.equals("nil"))
> {
>    System.outprintln("Name is=="+p);
>
> }
> else
> {
>    System.out.println("Who is it??"+AA);
> }
> ****************************************

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
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

Reply via email to