Hi,
I have discovered a strange behaviour in Tomcat 4.0.3.
When using inclusion like
requestDispatcher().include() in servlets or
<jsp:include page="..." /> in JSP pages,
pathInfo parameters don't work as expected, and should probably not be
used.
This problem appears when you create a servlet that uses the pathInfo
part of the request to include another resource from the context,
especially a JSP page.
Example:
You have a context "test" and a servlet "test02" that is called like
"/test/test02/somefile". Then in "test02" you use the pathInfo
"/somefile" to do something like
requestDispatcher("/test02/somefile").include(request, response).
Now let's say "somefile" can be "some.jsp" and "test.html", which are
pages in the context.
If in "some.jsp" there is a statement <jsp:include
page="/test02/test.html">, and you call "/test/test02/some.jsp" in the
browser, inclusion won't work, and you will even run in an ugly endless
inclusion loop. HOWEVER if you change from using pathInfo to "old style"
parameters (like /test/test02?file=some.jsp" and <jsp:include
page="test02?file=test.html"> it works fine. However, I see no reason
for the pathInfo parameter case not working as well.
I have set up a bug in the Tomcat Bugzilla database and created a small
war archive (http://www.sysmics.de/download/test.war) that illustrates
the problem and gives plenty of cases. Please have a look at the
"/index.html" page for an overview.
It would be nice if someone could confirm if this is really a bug in
Tomcat or not.
Best Regards,
Alex.
-------------------
Alexander Kandzior
Alkacon GbR
Im Meisengrund 4a
50996 Koeln, DE
Tel: +49 (0)2236 963491
Fax: +49 (0)2236 963492
Email: [EMAIL PROTECTED]
http://www.alkacon.de
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>