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 10711] New: - [PATCH] relative filenames with ../ do not work for JSP-includes
Date Thu, 11 Jul 2002 19:29:02 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=10711>.
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=10711

[PATCH] relative filenames with ../ do not work for JSP-includes

           Summary: [PATCH] relative filenames with ../ do not work for JSP-
                    includes
           Product: Tomcat 4
           Version: 4.1.7
          Platform: All
               URL: http://www.freiheit.com/users/hzeller/RelativeUri-
                    BUG.patch.gz
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: H.Zeller@acm.org


Including relative files that start with ../ in JSPs, like  
<jsp:include name="../../foo.jsp"/>  
does not work anymore with Jasper2.  
  
Symptom  
The java file in generated at the expected place, but the  
the relative filename is not assembled correctly, so that the compiler  
does not compile it.  
  
Solution  
The problem is, that the filename seems not to be assembled correctly if ../  
are in the path.  
Tracking this down revealed, that at several places this makes problems since  
the same place can have different names (for instance in looking up the URL  
classloader).   
Calling getCanonicalPath() in some places would help, but it is better to make  
the URI canonical in the first place. See patch at  
 <http://www.freiheit.com/users/hzeller/RelativeUri-BUG.patch.gz>  
It is against a current CVS checkout.

--
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