-none- 2007-09-06 - By David Smith
Back 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@(protected) To unsubscribe, e-mail: users-unsubscribe@(protected) For additional commands, e-mail: users-help@(protected)
|
|