Struts workflow and struts2 Workflow
Struts Workflow
The figure shows that the process of a request in the Struts2 framework is roughly divided into the following steps:
1. The client initializes a request pointing to a Servlet container (such as Tomcat;
2. This request goes through a series of filters (these filters have an optional Filter called ActionContextCleanUp, which is very helpful for the integration of Struts2 and other frameworks, such as SiteMesh Plugin );
3. FilterDispatcher is called. FilterDispatcher asks ActionMapper to determine whether the request needs to call an Action;
4. If ActionMapper decides to call an Action, FilterDispatcher submits the request processing to ActionProxy;
5. ActionProxy queries the framework Configuration file through Configuration Manager and finds the Action class to be called;
6. ActionProxy creates an ActionInvocation instance.
7. The ActionInvocation instance uses the naming mode for calling. Before and after the Action is called, the call of the relevant Interceptor (Intercepter) is involved.
8. Once the Action is executed, ActionInvocation is responsible for finding the corresponding return result based on the configuration in struts. xml. The returned result is usually (but not always, or another Action chain) a template of JSP or FreeMarker to be represented. You can use the tag inherited from the Struts2 framework in the Process of representation. ActionMapper is required in this process.