tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terrence Szeto" <t3sz...@hotmail.com>
Subject Re: Filters running twice!!!
Date Mon, 11 Feb 2002 20:54:21 GMT
Thanks Craig

I reordered the xml file.

I noticed in the log file it does complain about the web.xml file, but it 
still let me run the webapp.  It doesn't complain about that now.

however that didn't really do much for the filter problem.

What would normally cause the webapp to be initialized twice?
Would any sort of configuration of the server.xml? web.xml? or something 
within the JSP pages I have?


Thanks,

Terrence Szeto
Cybermation
Web Architect




From: "Craig R. McClanahan" <craigmcc@apache.org>
Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
To: Tomcat Users List <tomcat-user@jakarta.apache.org>
Subject: Re: Filters running twice!!!
Date: Mon, 11 Feb 2002 12:29:28 -0800 (PST)
MIME-Version: 1.0
Received: from [192.18.49.131] by hotmail.com (3.2) with ESMTP id 
MHotMailBE3174C1005A400438DAC0123183D3090; Mon, 11 Feb 2002 12:29:54 -0800
Received: (qmail 11550 invoked by uid 97); 11 Feb 2002 20:29:34 -0000
Received: (qmail 11531 invoked from network); 11 Feb 2002 20:29:34 -0000
>From tomcat-user-return-10512-t3szeto Mon, 11 Feb 2002 12:31:43 -0800
Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
List-Subscribe: <mailto:tomcat-user-subscribe@jakarta.apache.org>
List-Help: <mailto:tomcat-user-help@jakarta.apache.org>
List-Post: <mailto:tomcat-user@jakarta.apache.org>
List-Id: "Tomcat Users List" <tomcat-user.jakarta.apache.org>
Delivered-To: mailing list tomcat-user@jakarta.apache.org
In-Reply-To: <F131pqpEq8hZYNX6Mma0001427b@hotmail.com>
Message-ID: <20020211122710.F91109-100000@icarus.apache.org>
X-Spam-Rating: localhost 1.6.2 0/1000/N
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

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>

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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