Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.dispatcher
Class ActionContextCleanUp

    java.lang.Object
      org.apache.struts2.dispatcher.ActionContextCleanUp

All Implemented Interfaces:
  javax.servlet.Filter

Deprecated. Since Struts 2.1.3, use `StrutsPrepareFilter` and `StrutsExecuteFilter` to use other Servlet filters that need access to the ActionContext

    public class ActionContextCleanUp

extends java.lang.Object
implements javax.servlet.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:

- this filter
- SiteMesh filter
- `FilterDispatcher`

Version:
  $Date: 2008-07-07 16:10:42 +0200 (Mon, 07 Jul 2008) $ $Id: ActionContextCleanUp.java 674498 2008-07-07 14:10:42Z mrdon $
See Also:
  `FilterDispatcher`, `Dispatcher`, `StrutsPrepareFilter`, `StrutsExecuteFilter`

Constructor Summary
`ActionContextCleanUp()` Deprecated.

Method Summary
`protected static void` | `cleanUp(javax.servlet.ServletRequest req)` Deprecated. Clean up the request of threadlocals if this is the last execution
`void` | `destroy()` Deprecated.
`void` | `doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)` Deprecated.
`void` | `init(javax.servlet.FilterConfig arg0)` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ActionContextCleanUp

    public ActionContextCleanUp()

  Deprecated.

Method Detail

### doFilter

    public void doFilter(javax.servlet.ServletRequest req,
                         javax.servlet.ServletResponse res,
                         javax.servlet.FilterChain chain)
                  throws java.io.IOException,
                         javax.servlet.ServletException

  Deprecated.
  Specified by:
    `doFilter` in interface `javax.servlet.Filter`
  Throws:
    `java.io.IOException`
    `javax.servlet.ServletException`
  See Also:
    `Filter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)`

### cleanUp

    protected static void cleanUp(javax.servlet.ServletRequest req)

  Deprecated.
  Clean up the request of threadlocals if this is the last execution

  Parameters:
    `req` - The servlet request

### destroy

    public void destroy()

  Deprecated.
  Specified by:
    `destroy` in interface `javax.servlet.Filter`

### init

    public void init(javax.servlet.FilterConfig arg0)
              throws javax.servlet.ServletException

  Deprecated.
  Specified by:
    `init` in interface `javax.servlet.Filter`
  Throws:
    `javax.servlet.ServletException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.