tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Yarrow <yar...@best.com>
Subject Re: filter-mapping to tomcat DefaultServlet
Date Sun, 06 Nov 2005 03:37:39 GMT
Hi Hassan

Yeah, I believe it was Tim Funk who had originally
recommended the same to me as you are doing.  Maybe
it is the presence of the <url-pattern> that is causing
it to fail, though I doubt it.  I guess I understood the
<url-pattern> to be the "filter responds to..." and the
<servlet-name> to be the "filter sends to..."

Anyhow, I should probably try this again, just to be sure.
(For your info: FedoraCore1/tomcat 5.0.28/j2sdk 1.4.2_05)

Thanks

Maurice



Hassan Schroeder wrote:
> 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!



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


Mime
View raw message