In this image (which I got from here), HTTP request sends something to Dispatcher Servlet.
In Spring MVC, all incoming requests go through a single servlet. This servlet - DispatcherServlet - is the front controller. Front controller is a typical design pattern in the web applications development. In this case, a single servlet receives all requests and transfers them to all other components of the application.
The task of the DispatcherServlet is to send request to the specific Spring MVC controller.
Usually we have a lot of controllers and DispatcherServlet refers to one of the following mappers in order to determine the target controller:
If no configuration is performed, the DispatcherServlet uses BeanNameUrlHandlerMapping and DefaultAnnotationHandlerMapping by default.
When the target controller is identified, the DispatcherServlet sends request to it. The controller performs some work according to the request
(or delegate it to the other objects), and returns back to the DispatcherServlet with the Model and the name of the View.
The name of the View is only a logical name. This logical name is then used to search for the actual View (to avoid coupling with the controller and specific View). Then DispatcherServlet refers to the ViewResolver and maps the logical name of the View to the specific implementation of the View.
Some possible Implementations of the ViewResolver are:
When the DispatcherServlet determines the view that will display the results it will be rendered as the response.
Finally, the DispatcherServlet returns the Response object back to the client.