tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terrence Szeto" <t3sz...@hotmail.com>
Subject Filters running twice!!!
Date Mon, 11 Feb 2002 20:25:32 GMT
I'm not sure why, but the filters which I have on my servers are running 
twice.

my ROOT/WEB-INF/web.xml file looks like this

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <security-constraint>
    <web-resource-collection>
     <web-resource-name>protected</web-resource-name>
     <url-pattern>/protected/*</url-pattern>
     <url-pattern>/main.jsp</url-pattern>
    </web-resource-collection>

     <auth-constraint>
      <role-name>role1</role-name>
      <role-name>tomcat</role-name>
    </auth-constraint>

  </security-constraint>

  <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
      <form-login-page>/login.jsp</form-login-page>
      <form-error-page>/error.jsp</form-error-page>
    </form-login-config>
  </login-config>

  <filter>
    <filter-name>dbLogFilter</filter-name>
    <filter-class>com.cybermation.support.filters.DbLogFilter</filter-class>
  </filter>

  <filter>
    <filter-name>restrictFilter</filter-name>
    
<filter-class>com.cybermation.support.filters.RestrictFilter</filter-class>
  </filter>

  <filter>
    <filter-name>logFilter</filter-name>
    <filter-class>LogFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>logFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>dbLogFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>restrictFilter</filter-name>
    <url-pattern>/protected/files/*</url-pattern>
  </filter-mapping>

  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

</web-app>

Does anyone know why this happens?  or what's the work around for a 
solution?

Thanks.


Terrence Szeto
Cybermation
Web Architect



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message