Spring vs. Struts in Java


Struts and spring both are used to develop Java web applications. Struts were developed earlier than Spring but with enhancements in the Struts framework, both are used nowadays to develop web applications using Java.

Spring framework:

Modular, portable and testable Java applications can be formed using open-source spring framework. It is a standard for developing web apps and can be used over J2EE aka Java to Enterprise Edition applications. This handles the infrastructure and makes the codes reusable and testable thereby enhancing their performance. It works on an inversion of control IoC and dependency injection concept. It is also used to decrease the coupling between the modules of the program.

Spring Framework Architecture


Struts framework:

Struts is a framework based on MVC architecture that stands for model view and Controller architecture. It is an open-source platform and is used to develop enterprise edition web applications. It has a request handler and response handler because it is based on request-based Framework which handles the request from the user. AJAX, REST and SOAP are supported by Struts.

Working of Struts:


Difference between Spring and Struts architecture

Struts Spring
It is a lightweight framework. It is a heavyweight framework.
It does not support tag library. It supports tag library directive.
It has loosely coupled modules. It has tightly coupled programming modules.
It is integrated with ORM Technologies using which, lesser coding is required after and before the main logic. It supports manual coding.
It has a layered MVC architecture containing 3 layers for modelling, viewing and controller. It does not have a layered architecture.


Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.