Example & Tutorial understanding programming in easy ways.

What are the advantages of Spring MVC over Struts MVC ?

 Following are some of the advantages of Spring MVC over Struts MVC:
 1 Spring's MVC is very versatile and flexible based on interfaces but Struts forces Actions and Form  object into concrete inheritance.
 2 Spring provides both interceptors and controllers, thus helps to factor out common behavior to the  handling of many requests.
 3 Spring can be configured with different view technologies like Freemarker, JSP, Tiles, Velocity,  XLST etc. and also you can create your own custom view mechanism by implementing Spring View  interface.
 4 In Spring MVC Controllers can be configured using DI (IOC) that makes its testing and integration  easy.
 5 Web tier of Spring MVC is easy to test than Struts web tier, because of the avoidance of forced  concrete inheritance and explicit dependence of controllers on the dispatcher servlet.
 6 Struts force your Controllers to extend a Struts class but Spring doesn't, there are many convenience  Controller implementations that you can choose to extend.
 7 In Struts, Actions are coupled to the view by defining ActionForwards within a ActionMapping or  globally. SpringMVC has HandlerMapping interface to support this functionality.
 8 With Struts, validation is usually performed (implemented) in the validate method of an ActionForm.  In SpringMVC, validators are business objects that are NOT dependent on the Servlet API which  makes these validators to be reused in your business logic before persisting a domain object to a  database.

Read More →
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!