Hi,
I guess you're not a big fan of JavaDocs? ;)  Check out the JavaDoc for
HttpServletRequest#getPathInfo, especially the "Returns" section, which
is fairly unambiguous as these things go:
"Returns:
a String, decoded by the web container, specifying extra path
information that comes after the servlet path but before the query
string in the request URL; or null if the URL does not have any extra
path information"

Decoded is the key word above.

Yoav Shapira http://www.yoavshapira.com


>-----Original Message-----
>From: Garret Wilson [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 07, 2004 9:50 PM
>To: Tomcat Users List
>Subject: wrongly URI-decoded request.getPathInfo()
>
>I'm using Tomcat 5.5.4. I have an HTTP servlet mapped to /servlet/*.
>
>I send a request to the servlet on localhost like this:
>
>http://localhost/webapp/servlet/test/encoded%2Ffilename
>
>Here's what I get from the servlet request:
>
>request URI: /webapp/servlet/test/encoded%2Ffilename
>request URL: http://localhost/webapp/servlet/test/encoded%2Ffilename
>path info: /test/encoded/filename
>
>Why did Tomcat unencode my filename for request.getPathInfo()?
>
>This really throws a kink into things---I'm going to have to ignore
path
>info and do a lot of work with the request URI and/or URL to find out
>the actual path passed to my servlet!
>
>Why on earth would Tomcat unencode my URI? How can I get the *real*
path
>info?
>
>Garret
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to