When you look for a MVC framework you will find there is two main candidates: Struts 2 and Spring Framework.

I will not argue which is better, because both are a fit for different situations , not only technical situations.

TL;DR , the main difference between Spring MVC and Struts 2 is the way they handle the requests, Spring MVC IS a servlet while struts 2 uses a filter to execute the action, BUT the learning curve of Spring 2 is way shorter than Spring MVC, if you have a very very complex requirement for a short time you can build an elegant and robust solution with Struts 2, if you have experience with spring and your backend already uses spring framework your best choice is Spring MVC.

Spring MVC

Spring MVC is part of one of the biggest frameworks available for Java :Spring Framework, relies on IoC (Inversion of Control) and complements the OOP with Aspect Oriented Programming by using the dependency injection.

So this means, when you are using Spring MVC you probably have a backend made with Spring so you can access to the application context and work with the beans that are loaded by injecting them to your MVC Controller.

Finally, Spring MVC is designed around a dispatcher servlet that catch all the incoming requests and dispatches to the handlers, so it’s a servlet.

Struts 2

Struts 2 is a stand alone MVC framework which meansĀ  you are not tied to a technology in particular, you can integrate it easily with Hibernate, JSP, Spring, etc. In the “old days” you were tied to JSP for the view layer, but now thanks to the plugins you can create a modern singlepage site in integrate it with Struts 2.

Struts 2 uses the Filter from javax to intercept the requests and choose the action required to process it.

The filter (since struts 2.3) is the PrepareAndExecuteFilter that handles the incoming request, for its preparation and execution. So when a new requests is passed by the filter it will search for the required action, then the request is passed to interceptors that will execute tasks like validations, then is passed to the action class to process and generate a result.

The result is passed back by interceptors too and finally the PrepareAndExecuteFilter will deliver the result to the client.