Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 61037 invoked from network); 6 Apr 2011 12:20:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2011 12:20:47 -0000 Received: (qmail 55782 invoked by uid 500); 6 Apr 2011 12:20:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 55619 invoked by uid 500); 6 Apr 2011 12:20:43 -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 55610 invoked by uid 99); 6 Apr 2011 12:20:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 12:20:43 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [187.58.240.122] (HELO ctba.strategos.com.br) (187.58.240.122) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 12:20:34 +0000 Received: by ctba.strategos.com.br (Postfix, from userid 104) id 3CD8B158085; Wed, 6 Apr 2011 09:11:51 -0300 (BRT) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on ctba.strategos.com.br X-Spam-Level: Received: from [10.0.1.53] (unknown [187.58.240.124]) by ctba.strategos.com.br (Postfix) with ESMTP id 37A2215807D for ; Wed, 6 Apr 2011 09:11:45 -0300 (BRT) Message-ID: <4D9C5A60.1020309@strategos.com.br> Date: Wed, 06 Apr 2011 09:19:44 -0300 From: Sergio Organization: Strategos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: users@tomcat.apache.org Subject: Valve to intercept outgoing requests Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, hits=-97.2 required=5.0 tests=AWL,BAYES_05, DNS_FROM_OPENWHOIS,FH_DATE_PAST_20XX,RDNS_NONE,USER_IN_WHITELIST version=3.2.3 I made this Valve, trying to intercept requests going out of my "WebPages" context to the "Webservices" context. Right now they are both running in the same Tomcat (5.5.33), but that may not be true in the future. public class TestValve extends org.apache.catalina.valves.ValveBase { @Override public void invoke(Request request, Response response) throws IOException, ServletException { System.out.println("TestValve"); if (request.getRequestURI().contains("/WebPages")) { System.out.println("TestValve: context /WebPages"); String teste = (String) request.getSession().getAttribute("test"); request.setAttribute("test", teste); } getNext().invoke(request, response); } } The idea is to intercept the request to implicitly set attributes to be recovered at the "Webservices" context. This is not working. Any ideas why? Sergio --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org