|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.dispatcher.ActionContextCleanUp
StrutsPrepareFilter
and
StrutsExecuteFilter
to use other Servlet filters that need access to
the ActionContext
public class ActionContextCleanUp
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.
FilterDispatcher
will know to not clean up and
instead defer cleanup to this filter. The ordering of the filters should then be:
FilterDispatcher
FilterDispatcher
,
Dispatcher
,
StrutsPrepareFilter
,
StrutsExecuteFilter
Field Summary | |
---|---|
private static String |
COUNTER
Deprecated. |
private static Logger |
LOG
Deprecated. |
Constructor Summary | |
---|---|
ActionContextCleanUp()
Deprecated. |
Method Summary | |
---|---|
protected static void |
cleanUp(ServletRequest req)
Deprecated. Clean up the request of threadlocals if this is the last execution |
void |
destroy()
Deprecated. |
void |
doFilter(ServletRequest req,
ServletResponse res,
FilterChain chain)
Deprecated. |
void |
init(FilterConfig arg0)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger LOG
private static final String COUNTER
Constructor Detail |
---|
public ActionContextCleanUp()
Method Detail |
---|
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException
doFilter
in interface Filter
IOException
ServletException
Filter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
protected static void cleanUp(ServletRequest req)
req
- The servlet requestpublic void destroy()
destroy
in interface Filter
public void init(FilterConfig arg0) throws ServletException
init
in interface Filter
ServletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |