tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: How to get Request from RequestFacade
Date Thu, 06 Sep 2007 11:29:23 GMT
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.


Tremal Naik wrote:

>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
>Session catalinaSession = request.getSessionInternal(false);
>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:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message