×
☰ See All Chapters

Spring MVC Vs JSF - What are the differences?

Below table lists out the differences between JSF and Spring MVC, Advantage of one over other and their differences over architecture.

JSF

Spring MVC

FacesServlet is the central Servlet that dispatches requests to managed Bean class.

DispatcherServlet is the central Servlet that dispatches requests to controllers.

Managed Bean class executes the business logic, sets the processing result to the response

Controller class executes the business logic, sets the processing result to the response

JSf configuration file: faces-config.xml

Spring MVC configuration file: <logical name of DispatcherServlet in web.xml>-servlet.xml

Navigation rule is specified in JSf configuration file (faces-config.xml)

Navigation rule is specified by using HandlerMapping in spring configuration file ( <logical name of DispatcherServlet in web.xml>-servlet.xml )

Renderer takes care of response

ViewResolver takes care of response

JSP/facelets are used for view

View implementation class/JSP is used for view

Less Support for Dependency Injection

Full Support for Dependency Injection

Given by Sun Specification

Given by Interface 2.1

Has basic built in input validation

Developer has to implement validations.

Built in support for AJAX

No built in support for AJAX

Supports JSF expression language

Supports JSP expression language

 

 


All Chapters
Author