The basic brief flow is as follows:
1. The client browser makes an HTTP request.
2, according to the Web. XML configuration, the request is filterdispatcher filtered.
3. According to the Struts.xml configuration, find the action class and method that need to be called.
4. Action invokes the business logic component to process the business logic.
5, the action is completed, according to the configuration in the Struts.xml to find the corresponding result of the return, and jump to the corresponding page.
6. Returns the HTTP response to the client browser.
Why to use Struts
1. It is based on a well-recognized pattern of MVC, and struts is involved in M, V, and C, but it is mainly provided with a good controller and a set of custom tag libraries, which means that its focus is on C and V, so it is inherently a series of advantages of MVC, such as: structured hierarchy, high reusability, increase the robustness and scalability of the program, facilitate the development and design division of labor, to provide centralized and unified access control, calibration, internationalization, logging and so on;
2. Second, it is an open source project has been included its inventor Craig R.mcclanahan, including some of the program Masters and master continued and careful care, and withstood the actual test, so that its function more and more powerful, the system is also improving;
3. It is a good integration of other technologies and frameworks.
3. Say the design pattern of struts and why you should use struts