On Wed, 22 Jan 2003, Erik Price wrote:
> Date: Wed, 22 Jan 2003 14:38:05 -0500 > From: Erik Price <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: Tomcat Users List <[EMAIL PROTECTED]> > 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 Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>