HttpServletRequest.getPathInfo()
843841Aug 29 2005 — edited May 22 2010If 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.