org.roscopeco.janno.core
Class RequestLifecycleFilter
java.lang.Object
org.roscopeco.janno.core.RequestLifecycleFilter
- All Implemented Interfaces:
- Filter
public class RequestLifecycleFilter
- extends Object
- implements Filter
Manages request container lifecycle. This filter should be applied
to any request that will cause access to the scoped container tree.
It is highly recommended it be applied to all requests in a
given context (with the mapping /*
) to avoid strange and
difficult-to-trace error behaviour.
This filter is manadatory for any request that will cause interaction with
the Janno context tree. It can be configured for a given context
with an entry like:
<filter>
<filter-name>RequestLifecycle</filter-name>
<filter-class>org.roscopeco.janno.core.RequestLifecycleFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RequestLifecycle</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
In the appropriate context's web.xml
.
- Version:
- $Revision: 1.2 $ $Date: 2005/07/28 01:28:31 $
- Author:
- Ross Bamford (rosco<at>roscopeco.co.uk)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestLifecycleFilter
public RequestLifecycleFilter()
init
public void init(FilterConfig cfg)
throws ServletException
- If you override this class make sure you call through to this
to set up the ServletContext reference.
- Specified by:
init
in interface Filter
- Throws:
ServletException
doFilter
public void doFilter(ServletRequest req,
ServletResponse resp,
FilterChain chain)
throws IOException,
ServletException
- Specified by:
doFilter
in interface Filter
- Throws:
IOException
ServletException
destroy
public void destroy()
- Specified by:
destroy
in interface Filter
getServletContext
protected ServletContext getServletContext()
Copyright © 2005 Roscopeco Open Technologies. All Rights Reserved.