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/07/11 21:29:02 UTC

DO NOT REPLY [Bug 10711] New: - [PATCH] relative filenames with ../ do not work for JSP-includes

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>