tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: Likely bug in org.apache.jasper.servlet.JspServlet (Tomcat 5)
Date Thu, 11 Dec 2003 09:21:27 GMT
Reshat Sabiq wrote:
> I think i found a bug in Tomcat 5 implementation (J2EE 1.4-DR). I would 
> highly appreciate if somebody could provide a brief description of what 
> includeUri, and requestUri below stand for. I looked at the comments in 
> Constants, but can't make out a lot out of them. Please see my comment 
> below.
> org.apache.jasper.servlet.JspServlet.service() starting on line 190:
>            String includeUri
>                = (String) request.getAttribute(Constants.INC_SERVLET_PATH);
>            String requestUri
>                = (String) request.getAttribute(Constants.INC_REQUEST_URI);
>                      String jspUri;
>                      // When jsp-property-group/url-matching is used, 
> and when the
>            // jsp is not defined with <servlet-name>, the url
>            // as to be passed as it is to the JSP container (since
>            // Catalina doesn't know anything about the requested JSP
>                      // The first scenario occurs when the jsp is not 
> directly under /
>            // example: /utf16/foo.jsp
>            if (requestUri != null){
>                ////////// This is pretty unsafe syntax, and i do get an 
> exception here, which is the only reason why i can't migrate my app to 
> J2EE 1.4-DR! ///////////
>                String currentIncludedUri
>                    = requestUri.substring(requestUri.indexOf(includeUri)); 
>                if ( !includeUri.equals(currentIncludedUri) ) {
>                    includeUri = currentIncludedUri;
>                }
>            }
> 
> P.S. On a positive note, the custom error pages do work in DR, as 
> opposed to Beta 2.

This works fine for me. How about telling us what kind of include causes 
your bug, and the exception you get ?

Rémy


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


Mime
View raw message