Spring MVC File System or Flow





Step 1:

The user puts request to the application.

Step 2:

The request gets received by web.xml. web.xml sends request to the Dispatcher otherwise the request is received by Dispatcher Servlet. It is not created by us. It works already in the background. Dispatcher Servlet takes the help of Handler Mapping to know about Controller means Controller path, Controller base package. (Hnadler Mapping will find it out)

Step 3:

Once Handler Mapping gets the name of the User Defined Controller then the request is transferred to the user defined Controller and it processes the request and executes the particular method and after processing the request, user defined contoller returns the object name as model and view (It contains Controller Object and view name, it returns model and view object to the Dispatcher Servlet)

Step 4:

Then Dispatcher Servlet sends the model object to the View Resolver to get the view and then the Dispatcher Servlet finally sends to the view and displays the result.

Everything is written in SpringBean.xml. Handler Mapping reads the SpringBean.xml.