What is the difference between Strust1 and STRUST2,SPRINGMVC?

Source: Internet
Author: User

The difference between Strust1 and struts2

1.STRUTS2 is a new framework based on WebWork, which is more convenient than struts1 learning.
Struts2 mainly improves the Struts1 servlet and action
STRUTS2 's core framework is used as a filter to implement its function, while Struts1 is Actionservlet
STRUTS2 also offers interceptors
Speed is a bit slower relative to Stuts1.

The difference between 2.STRUST2,SPRINGMVC

1.STRUTS2 is a class-level interceptor, a class that corresponds to the request context, SPRINGMVC is a method-level intercept, a method corresponds to a requset context, and the method corresponds to a URL, so it is easy to implement SPRINGMVC from the schema itself RESTful URLs, and the STRUTS2 architecture is a laborious implementation. Because a method of action in Struts2 can correspond to a URL, and its class properties are shared by all methods, annotations cannot be used

2.SrpingMVC methods are basically independent, exclusive request,response data, request data through parameters, processing results through MODELMAP to the framework, the method is not shared variables and Struts2, All action variables are shared.

3. In the interceptor mechanism, STRUTS2 has its own interceptor mechanism, spring uses the independent AOP way, thus causes the STRUTS2 the configuration file volume to be larger than SPRINGMVC

The 4.SpringMVC entrance is the servlet, and Struts2 is the filter

5.SpringMVC integrates Ajax with only one annotation @responsebody can be implemented and Struts2 must install plugins

6.SpringMVC and spring are seamless, and from the management and security of the project is also higher than the STRUTS2

7. Design ideas, Struts2 more in line with OOP into thinking. SPRINGMVC is extended on the servlet

What is the difference between Strust1 and STRUST2,SPRINGMVC?

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.