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 Fri, 12 Dec 2003 07:48:56 GMT
Reshat Sabiq wrote:

> 
> 
> Remy Maucherat wrote:
> 
>> 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
>>
> I confirmed that it is a bug. It went further along after i put a 
> conditional.
> Now i'm getting an exception in:
> <fmt:message key="better" bundle="${lc}" />
> where lc is an instance variable of the jsp servlet: apparently it can't 
> be resolved. It was working in Beta 2, so this might be a bug too.
> 
> Thanks.
> 
> P.S. I'll post the details later.

Great: I really don't understand what you're trying to explain, and I 
don't see how this is related to the include issue mentioned above. So 
try to make it understandable if you want your bug to live longer than 5 
minutes ;-)

BTW, there could be changes between PFD 3 and the final spec.

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