tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 11047] New: - getRealPath is broken since Tomcat 4.0.4, worked in Tomcat 4.0.3
Date Mon, 22 Jul 2002 17:37:54 GMT
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=11047>.
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=11047

getRealPath is broken since Tomcat 4.0.4, worked in Tomcat 4.0.3

           Summary: getRealPath is broken since Tomcat 4.0.4, worked in
                    Tomcat 4.0.3
           Product: Tomcat 4
           Version: 4.0.4 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: michael.tamm@aperto.de


Suppose you have a specified a context in server.xml like this:
...
<Context path="" docBase="D:\wwwroot" debug="0" crossContext="true" />
<Context path="/images" docBase="D:\images" debug="0" crossContext="true" />
...
If you run the following code inside a JSP file:
<%
    ServletContext context = application.getContext("/images/");
    out.println(context.getRealPath("/foo.jpg"));
%>
Tomcat 4.0.3 correctly returned:
D:\images\foo.jpg

But Tomcat 4.0.4 does now return: 
D:\wwwroot\foo.jpg

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message