tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: using multiple filters
Date Wed, 22 Jan 2003 20:33:43 GMT

On Wed, 22 Jan 2003, Erik Price wrote:

> Date: Wed, 22 Jan 2003 14:38:05 -0500
> From: Erik Price <>
> Reply-To: Tomcat Users List <>
> To: Tomcat Users List <>
> Subject: using multiple filters
> I would like to use a filter on every servlet and JSP in my webapp to
> verify that the user is logged in (by checking the user's session for a
> value), except for "index.jsp" and "error.jsp" (error.jsp is for things
> like invalid messages, etc).
> I would also like to use a filter on certain servlets to perform Form
> Validation using org.apache.commons.validator.
> Is testing the URL the most elegant way to achieve the former
> (determining when the SecurityFilter should be in effect and when it
> shouldn't)?  And to use the latter (a form validation filter) do I need
> to register it in the same FilterChain as the the SecurityFilter?  Or
> can there be two separate, disparate filters for a given resource?

You can have any number of filters mapped to the same resources -- the
container assembles the filter chain for you, so you don't need to worry
about that.

> Erik


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

View raw message