Posts

Showing posts with the label Inerceptor

Quick Refresh : Struts2 : Flow, ActionMapper, ConfigurationManager, ActionContext, ActionInvocation, ValueStack

Image
Struts2  Struts 2 Flow: The flow of the struts 2 application, is combined with many components such as Controller, ActionProxy, ActionMapper, Configuration Manager, ActionInvocation, Interceptor, Action, Result, etc. A user sends a request for the action Container maps the request in the web.xml file and gets the class name of the controller. Container invokes the controller (StrutsPrepareAndExecuteFilter or FilterDispatcher). Since struts2.1, it is StrutsPrepareAndExecuteFilter. Before 2.1 it was FilterDispatcher. Controller gets the information for the action from the ActionMapper. means FilterDispatcher in turn uses the ActionMapper to determine weather to invoke an Action or not. If the action is required to be invoked, the FilterDispatcher delegates the control to the ActionProxy. Controller invokes the ActionProxy ActionProxy gets the information of action and interceptor stack from the configuration manager which gets the information from the struts.xml file. Th...