Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 2846 invoked from network); 5 Oct 2009 07:18:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Oct 2009 07:18:05 -0000 Received: (qmail 80402 invoked by uid 500); 5 Oct 2009 07:18:01 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 80322 invoked by uid 500); 5 Oct 2009 07:18:01 -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 80311 invoked by uid 99); 5 Oct 2009 07:18:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 07:18:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elli@sustainlane.com designates 64.151.100.157 as permitted sender) Received: from [64.151.100.157] (HELO dexter.sustainlane.com) (64.151.100.157) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 07:17:52 +0000 Received: from localhost (localhost [127.0.0.1]) by dexter.sustainlane.com (Postfix) with ESMTP id 22DFF8B440D for ; Mon, 5 Oct 2009 00:17:01 -0700 (PDT) X-Spam-Score: -4.309 X-Spam-Level: Received: from dexter.sustainlane.com ([127.0.0.1]) by localhost (dexter.sustainlane.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vwQ97Nr2Aklq for ; Mon, 5 Oct 2009 00:17:00 -0700 (PDT) Received: from dexter.sustainlane.com (dexter.sustainlane.com [64.151.100.157]) by dexter.sustainlane.com (Postfix) with ESMTP id C2C478B43B3 for ; Mon, 5 Oct 2009 00:17:00 -0700 (PDT) Date: Mon, 5 Oct 2009 00:17:00 -0700 (PDT) From: Elli Albek To: Tomcat Users List Message-ID: <15422962.55021254727020735.JavaMail.root@dexter> In-Reply-To: <4AC61236.3050404@apache.org> Subject: Re: Cannot set remote address in valve (Tomcat 5.5) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [127.0.0.1] X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-4.309 tagged_above=-10 required=11 tests=[ALL_TRUSTED=-1.8, AWL=0.090, BAYES_00=-2.599] 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 To: Tomcat Users List 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