tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Farmer <tomcat-u...@steve-farmer.com>
Subject Filter-mapping
Date Thu, 24 Mar 2005 20:22:46 GMT
Please accept my apology for my previous inappropriately formatted
message. (At least I hope that's the reason it was ignored.) If I'm
in the wrong forum, please accept my additional apologies and direct
me to an appropriate forum. If I need to "RTFM", please tell me
which "FM" I need to "R" 'cause I've studied multiple books and the
Java Servlet Spec 2.4, and I still don't understand this behavior. A
search of the web turned up some other folks who may have observed
the same behavior, but as far as I can tell they're just as confused
about it as I am.

I'm experimenting with filters in Tomcat 5.0.28 to test my
understanding. In one test I have the following

<filter-mapping> ...
    <dispatcher>ERROR</dispatcher>
... </filter-mapping>

and I try to stimulate it with the following JSP

<%@ page errorPage="/filtex-dummy.do" %>
${10%0} <%-- throw exception --%>

The servlet runs and receives the request attributes that an error
handler expects, but the filter does not run. However, if I change
ERROR to FORWARD, then both the filter and the servlet run.

JSS 2.4 seems to indicate that the <filter-mapping> must use
<url-pattern> when <dispatcher> has a value of ERROR, but I tried
both <servlet-name> and <url-pattern> with no apparent difference
in behavior.

My questions are
* Is this standard behavior or is it peculiar to Tomcat?
* In either case, is it possible to trigger the filter when
   <dispatcher> = ERROR? If so, how?

Thanks in advance and best regards,
Steve Farmer
tomcat-user@steve-farmer.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message