Struts workflow and struts2 Workflow

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.