The filter chain in Struts 2 includes :
Action ContextCleanUp filter
The ActionContextCleanUp filter is optional and it is useful when integration has to be done with other technologies like SiteMash Plugin.
Filter Dispatcher
Next, the FilterDispatch is called, which in turn uses the ActionMapper to determine whether to invoke an Action.
If the action is required to be invoked, the FilterDispatcher delegates the control to the ActionProxy.
Action Proxy
The ActionProxy takes the help from Configuration Files manager, which is initialized from the struts.xml.
Then the ActionProxy creates an ActionInvocation, which implements the command pattern.
The ActionInvocation process invokes the Interceptors (if configured) and then invokes the Action.
The the ActionInvocation looks for proper result.
Then the result is executed, which involves the rendering of JSP or templates.
Then the Interceptors are executed again in reverse order.
Finally the response returns through the filters configured in web.xml file.
If the ActionContextCleanUp filter is configured, the FilterDispatcher does not clean the ThreadLocal ActionContext.
If the ActionContextCleanUp filter is not present then the FilterDispatcher will cleanup all the ThreadLocals present.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.