tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Cannot set remote address in valve (Tomcat 5.5)
Date Fri, 02 Oct 2009 09:55:00 GMT
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.

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

The valve is a problem and that does limit your options. This should be
better in Tomcat 7 where the Servlet spec includes programmatic login so
you might be able to move your valve to a filter.

> 3. We have a few environments and I don't want to have different war
> configurations for each. We had servers with and without load balancers and
> I can see that change again in the near future. This should not affect the
> application configuration.
Essentially the same issue as 1 - setting the filter globally should
address this.

> 4. It is logically part of the server environment and not part of the web
> application. The web application should not change based on the network
> architecture. If the system admin adds/removes the load balancer then he
> should know about one thing he needs to change in tomcat, and not rebuild
> all the wars without a filter. Network configuration should not require code
> rebuild with/without filters (we have to do a build to create war, like most
> people).
Same as 3.

Mark




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


Mime
View raw message