You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/02/16 02:13:11 UTC

DO NOT REPLY [Bug 6480] - HttpServletRequest.getPathTranslated() returns different results on repeated actions

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6480>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6480

HttpServletRequest.getPathTranslated() returns different results on repeated actions

craig.mcclanahan@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From craig.mcclanahan@sun.com  2002-02-16 01:13 -------
For HEAD branch, fixed in nightly build 20020216.

For 4.0.x branch, will be fixed in 4.0.3.


NOTE 1:  It is the *second* value that is correct, not the first, because the 
value is interpreted as relative to the current context.  It's the same value 
you will receive if you use a <servlet-mapping> to access the servlet, and call 
getPathInfo() and getPathTranslated() from within it.

NOTE 2:  Using file I/O to access static resources within a web application is 
not portable to environments where a web application is run directly from a WAR 
file (in this case, there is no file path at all).  You should consider using 
ServletContext.getResource() or ServletContext.getResourceAsStream() instead.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>