Key components in the Spring MVC architecture are shown in the following figure:
Let's look at an example flow and understand the different steps involved in executing the flow. We will take flow 4, returning ModelAndView as the specific example. The URL of flow 4 is http://localhost:8080/welcome-model-view. The different steps are detailed as follows:
- The browser issues a request to a specific URL. DispatcherServlet is the Front Controller, handling all requests. So, it receives the request.
- Dispatcher Servlet looks at the URI (in the example, /welcome-model-view) and needs to identify the right controller to handle it. To help ...