Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 80513 invoked from network); 6 Sep 2007 11:42:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Sep 2007 11:42:44 -0000 Received: (qmail 26810 invoked by uid 500); 6 Sep 2007 11:42:29 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 26382 invoked by uid 500); 6 Sep 2007 11:42:28 -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 26371 invoked by uid 99); 6 Sep 2007 11:42:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 04:42:27 -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: domain of tremalnaik@gmail.com designates 209.85.132.250 as permitted sender) Received: from [209.85.132.250] (HELO an-out-0708.google.com) (209.85.132.250) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 11:42:25 +0000 Received: by an-out-0708.google.com with SMTP id b2so21840ana for ; Thu, 06 Sep 2007 04:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=WONhFDETE911OSqnFJlIGK3ES3Jv2Lyp1GnBGtWJDWY=; b=nc/SlxZECfstfg0AUpEsajpdODpCZY60PsyDot+4Ng0ycnDcLxCcKHUSyzexYmyaDt0RP66+rb/HSX5zs5vmbMtRk73OOMdaW4sew0LS5k8ZdnQOwZRZfEVyILIIlPs573KDMF3STtag51GbKGv186wpi3EkHa5lC5594lixqCM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UC/YiWTp959GCZwRZcYYZ0CfNsYlrEa/hBOtekcaJkL9ArasZuqi8E4OlZBjWzmqvrQL6dFIjsZizDHYZ2c0BAm35KXcfr+CGlRIsujJzrirMe4/KPJhThiOHOjb6yawjPNIhi5eGK2K7rbfNH4QUEdIfaYUP422NPcycNlL99o= Received: by 10.100.153.17 with SMTP id a17mr325446ane.1189078925003; Thu, 06 Sep 2007 04:42:05 -0700 (PDT) Received: by 10.100.173.18 with HTTP; Thu, 6 Sep 2007 04:42:04 -0700 (PDT) Message-ID: <5b889e570709060442q3a6349e1g7d806a015fac118f@mail.gmail.com> Date: Thu, 6 Sep 2007 12:42:04 +0100 From: "Tremal Naik" To: "Tomcat Users List" Subject: Re: How to get Request from RequestFacade In-Reply-To: <46DFE493.80608@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5b889e570709060343q23accd31y1137819c03439453@mail.gmail.com> <46DFE493.80608@cornell.edu> X-Virus-Checked: Checked by ClamAV on apache.org That's the point, I don't know much about request/response wrapping. I don't need the Facade itself, what I need are the "real" Catalina Request/Response objects hidden behind it. I don't know how to get them from inside a Filter. Thanks, TN 2007/9/6, David Smith : > May I ask what exactly you want to do with the facade? Seems like you > could do what you want with a request or response wrapper instead. > > --David > > Tremal Naik wrote: > > >Hello, > >I'v been using a valve to perform license checking in my web > >application. The method invoke(Request request, Response response) had > >access to the Request and Response objects, allowing me to perform > >some advanced operations. For instance, I made use of instructions > >like: > > > >Session catalinaSession = request.getSessionInternal(false); > >catalinaSession.access(); > > > >or > > > >Session[] managedSessions = request.getContext().getManager().findSessions(); > > > >Now, I'm moving the license validation code to a Filter. How do I > >access org.apache.catalina.connector.Request/Response in the method > >doFilter()? I see that I can only cast to a RequestFacade object: > > > >public void doFilter(ServletRequest sRequest, ServletResponse > >sResponse, FilterChain chain) > > throws IOException, ServletException > > { > > RequestFacade cRequest = (RequestFacade) sRequest; > > ...... > > > > > >but now, I cannot use the Facade to access the Request. How can I > >solve this problem? Is it desirable accessing Catalina specific object > >from a Filter? Should I rewrite my code/ redesign my license > >validation framework? It is a very complex one, hance it may require > >some effort. May you redirect me to some useful articles/resources? > > > > > >Many thanks > > > > > > > > > --------------------------------------------------------------------- > 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 > > -- TREMALNAIK --------------------------------------------------------------------- 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