From: Remy Maucherat [mailto:[EMAIL PROTECTED] > > [EMAIL PROTECTED] wrote: > > markt 2004/04/24 08:12:00 > > > > Modified: catalina/src/share/org/apache/catalina/core > > ApplicationDispatcher.java > > Log: > > - Fix bug19801. Request dispatcher does not set empty > javax.servlet.include request attributes > > on nested includes. Based on a patch suggested by > Matthias Ernst > > - Ported from TC4. > > I have a bad feeling about this "fix". > Are you absolutely certain the issue was valid ? Also, > setting the value > as null seems bad to me.
I am sure that this is a bug. To quote from the spec (SRV.8.3.1) The 2.3 spec is not as explicit but I believe this is the right approach for TC4 and TC5. <spec-quote> ...These attributes are accessible from the included servlet via the getAttribute method on the request object and their values must be equal to the request URI, context path, servlet path, path info, and query string of the included servlet, respectively. If the request is subsequently included, these attributes are replaced for that include. ... </spec-quote> The problem occurs with a nested sequence of includes as described in the original bug report: Servlet A, mapped at /A/* includes "/B/should.not.see" Servlet B, mapped at /B/* includes "/C" Servlet C, mapped at /C/* prints out request.getAttribute("javax.servlet.include.path_info") The output should be null (and is if you access /B) but if you access /A then should.not.see is returned. This can not be correct behaviour. Given the behaviour of requests for /B I am content with setting the value to null. > -1 for the change for the time being. Is the above enough to change your mind on this? Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]