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/04/02 16:02:12 UTC
DO NOT REPLY [Bug 7686] New: -
Issue with pathInfo in complex include() scenarios
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=7686>.
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=7686
Issue with pathInfo in complex include() scenarios
Summary: Issue with pathInfo in complex include() scenarios
Product: Tomcat 4
Version: 4.0.3 Final
Platform: PC
URL: http://www.sysmics.de/download/test.war
OS/Version: Windows NT/2K
Status: NEW
Severity: Minor
Priority: Other
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: a.kandzior@alkacon.de
This is 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 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.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>