The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Try This...

Posted by Thraksha V Balaji on October 25, 2000 at 4:53 AM

Hi,
What you tried should work. OK Try this.
call the Servlet like
http://192.168.0.111:8080/servlet/MyServlet/This/is/extra/url/

HttpServletRequest defines a method by name

getPathInfo(). This will return any extra path appended to the
Servlet. As in this example, it returns /This/is/extra/url
This is again a workaround. The Correct way is using Query
String.
Bye.


> I have two problems with java servlets that I can't cope with.
> One thing is that I've been trying to get the URL that a client sends with his request. I've tried almost everything. I heard that getQueryString() from the HttpServletRequest class that is suppose to "Return the query string that is contained in the request URL after the path.", is the right method. Unfortunatelly, it returns null.
> The second thing is that happened something like taking over sessions in servlets. I'm working with Jserv and I heard that the session ids that it generates are not unique. When a person has an open session and for example clicks "Refresh" he suddenly jumps into another person's session.
> PLZ help:))))






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us