Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HttpServletRequest.getPathInfo()

843841Aug 29 2005 — edited May 22 2010
If you were to execute the getPathInfo() method given the following URL (rewritten)

http://www.myserver.com/myContext/myAction.do;jsessionid=1234567890

where myAction.do maps to a servlet, what would you think the proper response should be?

null?

How about ";jsessionid=1234567890"?

I have run across an application server that believes the latter is a correct response.

In looking at the 2.4 servlet specification, in section SRV 4.4, I see the following:


PathInfo: The part of the request path that is not part of the Context Path or
the Servlet Path. It is either null if there is no extra path, or is a string with a
leading �/�.



Which leads me to believe that a response of ";jsessionid=1234567890" violates the spec because it does not begin with the leading slash ('/').

All the app servers I have tried, except one, return null.


Comments?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2010
Added on Aug 29 2005
7 comments
412 views