tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Filters running twice!!!
Date Mon, 11 Feb 2002 20:29:28 GMT
On Mon, 11 Feb 2002, Terrence Szeto wrote:

> Date: Mon, 11 Feb 2002 15:25:32 -0500
> From: Terrence Szeto <t3szeto@hotmail.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Filters running twice!!!
>
> I'm not sure why, but the filters which I have on my servers are running
> twice.
>

It doesn't really help you solve this problem, but I'd be quite amazed
that this webapp runs at all, since you have the elements out of the order
that's required by the DTD.  Tomcat should have thrown an XML parsing
exception and refused to run your app.

One other thing to watch out for is if the app is getting initialized
twice somehow.

Craig


> 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>
>
>


--
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