Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 55557 invoked from network); 1 Aug 2008 22:31:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Aug 2008 22:31:59 -0000 Received: (qmail 71784 invoked by uid 500); 1 Aug 2008 22:31:47 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 71768 invoked by uid 500); 1 Aug 2008 22:31:47 -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 71757 invoked by uid 99); 1 Aug 2008 22:31:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 15:31:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 22:30:51 +0000 Received: from [192.168.250.152] (p549EAD07.dip0.t-ipconnect.de [84.158.173.7]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id m71MV9MB005208 for ; Sat, 2 Aug 2008 00:31:10 +0200 Message-ID: <48938E83.6050907@ice-sa.com> Date: Sat, 02 Aug 2008 00:30:27 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: enabling/disabling a servlet filter conditionally References: <4893749F.3070701@ice-sa.com> <4eedb92a0808011432w442321cob5056c5091bcaf95@mail.gmail.com> In-Reply-To: <4eedb92a0808011432w442321cob5056c5091bcaf95@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on popeye.combios.es X-Virus-Scanned: ClamAV 0.92.1/7911/Fri Aug 1 14:10:36 2008 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-97.9 required=2.5 tests=RCVD_IN_PBL, RCVD_IN_SORBS_DUL,USER_IN_WHITELIST autolearn=no version=3.2.3 Hassan Schroeder wrote: > On Fri, Aug 1, 2008 at 1:39 PM, Andr� Warnier wrote: > >> Can one dynamically disable a servlet filter under some conditions, from >> within another preceding filter ? > > > You could /probably/ -- untested conjecture -- break the FilterChain at > that point by forwarding to a URL for which Filter B wasn't applied (or > was applied only to a REQUEST rather than FORWARD. > On second read, can you elaborate on that one ? Do I understand correctly, as follows ? Originally, I have for the servlet a like, for instance *.xyz and I have for filter B (the one to disable) a servletX I would a) replace this last by a *.xyz b) make filter A, in case it doesn't want filter B to run, change the request URL to, e.g., "something.abc", so that filter B does not run anymore. c) change the servlet def. so that it handles url-patterns "*.abc" AND "*.xyz". Yes ? If that works, that's a clever idea, which seems not too difficult to implement, even for me. Andr� --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org