An overview of Java’s struts 2 Framework

1、 Struts 2 framework concept

Struts 2 framework is a lightweight MVC process framework. Lightweight means that the program code is not many and the resources occupied by the runtime are not many. MVC process framework means that it is a framework that supports hierarchical development and controls the process of data, where it comes from, where it goes, how it comes from and how to go; Struts 2 is a web application framework based on MVC design pattern. It is essentially equivalent to a servlet. In MVC design pattern, struts 2 acts as a controller to establish the data interaction between model and view.

2、 Advantages and disadvantages of struts 2 Framework

1. Advantages

2. Shortcomings

A) it is still a little troublesome to get the parameters passed from JSP in action in struts 2. The getter and setter methods can be configured for the properties in the action of struts 2. The request parameters can be set to these properties through the default interceptor. In this way, when there are many request parameters, the action class will be bloated by these form attributes, which makes people feel very messy. In addition, the attributes in action can not only be used to obtain request parameters, but also be output to JSP, which will be more messy.

The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. At the same time, I also hope to support a lot of programming tips!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>