Save This Page
Home » struts-2.0.11.2-src » org.apache » struts2 » dispatcher » [javadoc | source]
org.apache.struts2.dispatcher
public class: ActionContextCleanUp [javadoc | source]
java.lang.Object
   org.apache.struts2.dispatcher.ActionContextCleanUp

All Implemented Interfaces:
    Filter

Special filter designed to work with the FilterDispatcher and allow for easier integration with SiteMesh. Normally, ordering your filters to have SiteMesh go first, and then FilterDispatcher go second is perfectly fine. However, sometimes you may wish to access Struts features, including the value stack, from within your SiteMesh decorators. Because FilterDispatcher cleans up the ActionContext , your decorator won't have access to the data you want.

By adding this filter, the FilterDispatcher will know to not clean up and instead defer cleanup to this filter. The ordering of the filters should then be:

Method from org.apache.struts2.dispatcher.ActionContextCleanUp Summary:
cleanUp,   destroy,   doFilter,   init
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.dispatcher.ActionContextCleanUp Detail:
 protected static  void cleanUp(ServletRequest req) 
    Clean up the request of threadlocals if this is the last execution
 public  void destroy() 
 public  void doFilter(ServletRequest req,
    ServletResponse res,
    FilterChain chain) throws IOException, ServletException 
 public  void init(FilterConfig arg0) throws ServletException