This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I've added a <filter> and a <filter-mapping> to web.xml that turns a functioning Tomcat 6.0 system into one with severe startup errors in catalina.log. My first thought is that the errors are caused by the new filter using the same filter-class as an existing filter (since the other additions are just params). Are two filters with the same filter-class permissible in Tomcat?
The filter class that's used twice handles single-sign-on. All the current pages are behind SSO. I've added a JSP page that requests user input before redirecting to the app's normal startup page, and it needs to be behind SSO as well. The two filters are necessary (as far as I know) because the url-patterns are different.
Here's the portion of catalina.log that's generated when Tomcat starts:
The short answer is yes, two filters can use the same filter class. you have deeper problems and you should start by posting the code of the filter in question.
The two filters are necessary (as far as I know) because the url-patterns are different.
it won't help your underlying problem, but you could make two filter-mappings that use the same filter instead of two filters. Each of the filter-mappings would have a different url-pattern, but the filter-name would be the same.
Thanks, Tim and Tim (you can arm-wrestle for the title of Tim). This site is a goldmine for beginners. Thanks for the info about filters.
Late one night last week as I was thinking about this task, having worked on it for several days, I decided I was going about it the wrong way and created a separate webapp. It's easier than having to fit my code around someone else's.
Is oracle.jdbc.driver.OracleDriver or servletapi-2.4-20040521.jar the MS SQL driver?
subject: Can two filters use the same filter-class?