|
||||||||||
| 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| 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 |
|---|
public ActionContextCleanUp()
| Method Detail |
|---|
public void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOException
javax.servlet.ServletExceptionFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)protected static void cleanUp(javax.servlet.ServletRequest req)
req - The servlet requestpublic void destroy()
destroy in interface javax.servlet.Filter
public void init(javax.servlet.FilterConfig arg0)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||