org.apache.beehive.controls.runtime.servlet
Class ControlFilter

Object
  extended by ControlFilter
All Implemented Interfaces:
Filter

public class ControlFilter
extends Object
implements Filter

The ControlFilter class provides an implementation of an HTTP servlet filter that supports running controls in the web tier. It works, in conjunction with the ServletControlContext class to provide runtime containment for controls. It ensures that a valid BeanContext has been set up prior to forwarding the request to the actual target servlet, and does post-processing to ensure that resources have been properly released. This filter supports the following initialization parameters: useSession - a boolean value that indicates whether the bean context should be stored in session. This makes the context (and any contained controls) accessible across multiple http requests. This filter needs to be configured in web.xml for URL mappings that will be hosting servlets.


Field Summary
static String BEAN_CONTEXT_ATTRIBUTE
           
 
Constructor Summary
ControlFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 void init(FilterConfig filterConfig)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_CONTEXT_ATTRIBUTE

public static String BEAN_CONTEXT_ATTRIBUTE
Constructor Detail

ControlFilter

public ControlFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
          throws ServletException
Specified by:
init in interface Filter
Throws:
ServletException

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Filter