tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elli Albek <e...@sustainlane.com>
Subject Re: Cannot set remote address in valve (Tomcat 5.5)
Date Mon, 05 Oct 2009 07:17:00 GMT
To make it clear, valves are executed around the web apps, so they are executed before the
request gets to any servlet filter. Servlet filter behavior is defined by the Servlet specification.
Valves are tomcat specific classes that contain some core server functionality that is not
defined by the spec as an interface.

E

----- Original Message -----
From: Tim Funk <funkman@apache.org>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Fri, 2 Oct 2009 07:46:14 -0700 (PDT)
Subject: Re: Cannot set remote address in valve (Tomcat 5.5)

Context filters are executed before webapp filters. I believe (but not 
confirmed) that valves execute before the filters.

-Tim

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Mark,
> 
> On 10/2/2009 5:55 AM, Mark Thomas wrote:
>> Elli Albek wrote:
>>> A few reasons why not to do this as a servlet filter:
>>>
>>> 1. There are many web apps on the server and I don't want to include the
>>> filter in each.
>> You don't have to. Configure it in the global web.xml.
> 
> Are the filters configured in conf/web.xml considered "before" those in
> WEB-INF/web.xml... that is, will they be called before the
> webapp-defined ones?
> 
>>> 2. There are other valves like request filters that cannot work without the
>>> correct IP, as well as custom login valve.
>> Filters should be OK providing they are defined in the right order.
> 
> Aren't all Valves always called before Filters?
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message