Request process lifecycle of Spring MVC:-
The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that handles all the HTTP requests and responses.
(OR)
Spring’s web MVC framework is, like many other web MVC frameworks,
request-driven, designed around a central Servlet that dispatches requests to
controllers and offers other functionality that facilitates the development of
web applications.The request processing workflow of the Spring Web MVC
DispatcherServlet is as follows:
Following is the Request process lifecycle of Spring MVC:
1 The client sends a request to web container in the form of http
request.
2 The incoming request is intercepted by Front controller (DispatcherServlet) and it will then tries to find out appropriate Handler Mappings.
3 With the help of Handler Mappings, the DispatcherServlet will dispatch the request to appropriate Controller.
4 The Controller tries to process the request and returns the Model and View object in form of ModelAndView instance to the Front Controller.
5 The Front Controller then tries to resolve the View (which can be JSP, Freemarker, Velocity etc) by consulting the View Resolver object.
6 The selected view is then rendered back to client.