An overview of the Spring MVC request flow
The main entry point for a web request in a Spring MVC application is via the dispatcher servlet. The dispatcher servlet acts as the front controller and dispatches the requests to the other controller. The front controller's main duty is to find the appropriate controller to hand over the request for further processing. The following diagram shows an overview of the request flow in a Spring MVC application:
Now, let's review the Spring MVC request flow in short:
When we enter a URL in the browser, the request comes to the dispatcher servlet. The dispatcher servlet then acts as a centralized entry point to the web application.
The dispatcher servlet determines a suitable controller that is capable of handling the request and dispatching this request to the controller.
The controller method updates objects in the model and returns the logical view name and updated model to the dispatcher servlet.
The dispatcher servlet consults...