tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolfe <>
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

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

Example: (posted at

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,

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.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message