tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hassan Schroeder <has...@webtuitive.com>
Subject Re: filter-mapping to tomcat DefaultServlet
Date Sat, 05 Nov 2005 23:43:55 GMT
Maurice Yarrow wrote:

> I was able to successfully use a filter to map to another servlet
> in my web app.  However, I  was not able to map to tomcat's
> DefaultServlet.
> 
> I tried a <filter-mapping> to <servlet-name> of "default" and
> also, as the below shows, to a <servlet-name> with the fully
> qualified classname for the tomcat DefaultServlet.
> Neither worked.

The configuration below works for me ( TC 5.5.9/JDK1.5.0 ), with
or without an additional <url-pattern> mapping. So "default" is a
valid <servlet-name>; not sure what else might cause your filter
to fail.

<filter>                   <!-- print "oink" to stdout :-)  -->
	<filter-name>squealFilter</filter-name>
	<filter-class>filters.SquealFilter</filter-class>
</filter>
<filter-mapping>
	<filter-name>squealFilter</filter-name>
	<servlet-name>default</servlet-name>
</filter-mapping>

HTH!
-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                          dream.  code.



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


Mime
View raw message