tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anhony" <>
Subject Re: How to use servlet filters without modifying webapp
Date Thu, 28 Apr 2005 13:48:55 GMT

Try adding a <filter> block to your web.xml. Your JSP container locates your 
filters thru these sections in the web.xml. I included a small sample 
<filter> block below.


I hope this helps.


----- Original Message ----- 
From: "joelsherriff" <>
To: "Tomcat Users List" <>
Sent: Thursday, April 28, 2005 9:36 AM
Subject: How to use servlet filters without modifying webapp

    I'm experimenting with applying a servlet filter to an existing webapp 
and I'm getting a ClassCastException upon startup.
Can I do this without modifying the webapp source and adding my filter in 
there?  If so, what else could be causing this?

I'm not sure where it looks for the filter .class file but I put it in the 
webapp's WEB-INF/classes directory - I guess it finds it
since I'm getting this error.  The filter really does nothing, I'm just 
trying to get A filter in place before making it more complicated. 

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

View raw message