This information is all available by looking through the servlet api...

its not real clear what you are asking for, but it looks like you want two
different things:
1) request.getPathInfo() returns a String equivalent to the CGI property
pathinfo (in this case it will equal "/path".
2) request.getParameter("hello") will return the String value of that
argument (as expressed "hello=hi" will return String "hi").
request.getParameterValues("hello") would return a String array
("hello=hi&hello=there" would return String array {"hi", "there"}.
BTW, you can get a list of the parameters with
request.getParameterNames(), which returns an enumeration of Strings.

for more info, see http://java.sun.com/products/servlet/2.1/api/tree.html

also, its generally not a good idea to use query strings ("?hello=hi") in
the FORM ACTION.  If you must have default values, use hidden input
fields.

Lance Lavandowska
Software Engineer
http://www.AgDomain.Com

-----Original Message-----
From: ARCHAIMBAULT SYLVAIN SOPRA <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, August 10, 1999 10:13 AM
Subject: Get URL datas


>--- Re�u de       RENEXTER.ARCHAISY ARCHAIMBAULT * 10/08/99 16.40
>
>
> Hi!
>
> I just begin to develop with servlet and I am looking for getting
>URL datas with my servlet. For example, I have a form whose ACTION
>is :
> http://my_server/servlet/my_servlet/path?hello
>
> I don't manage to get path and "hello" in my_servlet thank to the
>HttpServletRequest Object.
> Can anybody help me?
>
>        Sly
>
>---- 10/08/99 16.40 ---- Envoy� �      ---------------------------
>  -> SERVLET-INTEREST(a)JAVA.SUN.COM
>
>_________________________________________________________________________
__
>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
>

___________________________________________________________________________
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