tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolfe <cwo...@globetrotter.qc.ca>
Subject filter and forward, bug?
Date Fri, 26 Apr 2002 04:06:48 GMT
For the context surrounding this problem check my message to
tomcat-user earlier, it should not be required to reproduce the
glitch.

Under Tomcat-4.0.3, using a filter that wraps the ServletRequest and
replaces servletPath produces an infinite loop if the target uses
RequestDispatcher.forward.

Example: (posted at http://qlink.queensu.ca/~9cw4/test.zip)

web.xml: filter-mapping /go.jsp to TestFilter
TestFilter: change servletPath to /loop.jsp
loop.jsp: pageContext.forward("not-there.jsp");

The request originally passed to TestFilter is modified by Tomcat to
have servletPath == "not-there.jsp". Because the filter's wrapper
conceals the change the forward actually leads to loop.jsp again,
etc.

I think this is a bug, or at least the behavior makes very little
sense to me. I can nip through BugZilla and file a report as soon as
someone can conform I'm not just up too late at night.

Thanks,
Chris

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


Mime
View raw message