1. Struts2 framework concept
The Struts2 framework is a lightweight MVC process framework. Lightweight means that the program does not have a lot of code and does not occupy a lot of resources during runtime. The MVC process framework means that it supports hierarchical development, controlling the process of data, where to come, where to go, how to come, and how to go; Struts2 is a web application framework based on the MVC design pattern, which is essentially equivalent to a servlet. In the MVC design pattern, Struts2 serves as a controller to establish data interaction between the model and the view.
2. Pros and cons of struts2 framework
1. Advantages
2. Disadvantages
a) It is still a bit troublesome to get parameters passed from jsp in Action in Struts2. You can configure Getter and Setter methods for properties in Struts2's Action. Through the default interceptor, you can set the request parameters to these properties. If you use this method, when there are many request parameters, the Action class will be bloated by these form properties, which makes people feel very messy. There are also properties in Action that can not only be used to obtain request parameters but also output to jsp, which will be even more messy.
The above is all the content of this article. I hope that the content of this article will be of some help to everyone’s study or work. I also hope to support Wulin.com more!