Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 67151 invoked from network); 2 Oct 2009 09:55:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Oct 2009 09:55:56 -0000 Received: (qmail 81949 invoked by uid 500); 2 Oct 2009 09:55:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 81899 invoked by uid 500); 2 Oct 2009 09:55:51 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 81888 invoked by uid 99); 2 Oct 2009 09:55:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 09:55:51 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [193.252.22.128] (HELO smtp5.freeserve.com) (193.252.22.128) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 09:55:41 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3419.me.freeserve.com (SMTP Server) with ESMTP id 96C981C00085 for ; Fri, 2 Oct 2009 11:55:20 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3419.me.freeserve.com (SMTP Server) with ESMTP id 8A04A1C00086 for ; Fri, 2 Oct 2009 11:55:20 +0200 (CEST) Received: from mx01.dev.local (unknown [91.109.180.76]) by mwinf3419.me.freeserve.com (SMTP Server) with ESMTP id 5BA361C00085 for ; Fri, 2 Oct 2009 11:55:20 +0200 (CEST) X-ME-UUID: 20091002095520375.5BA361C00085@mwinf3419.me.freeserve.com Received: from localhost (localhost [127.0.0.1]) by mx01.dev.local (Postfix) with ESMTP id F419A3221A for ; Fri, 2 Oct 2009 10:55:34 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from mx01.dev.local ([127.0.0.1]) by localhost (mx01.dev.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xgfF2BmCanZl for ; Fri, 2 Oct 2009 10:55:32 +0100 (BST) Received: from [192.168.0.9] (study03.dev.local [192.168.0.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.dev.local (Postfix) with ESMTPSA id 1B1EC3206A for ; Fri, 2 Oct 2009 10:55:32 +0100 (BST) Message-ID: <4AC5CDF4.1070804@apache.org> Date: Fri, 02 Oct 2009 10:55:00 +0100 From: Mark Thomas User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Cannot set remote address in valve (Tomcat 5.5) References: <4B7A3AA67FB2456E8F477D96BCDBF8FF@ealbek> <4ABF7789.1010308@cornell.edu> <6FA924FC646B45319F42E7207C67BC44@ealbek> In-Reply-To: <6FA924FC646B45319F42E7207C67BC44@ealbek> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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