Thursday, 9 October 2014

Spring MVC Flow Diagram



1.      Whenever end user given the request then Spring MVC front controller called Dispatch Servlet will receive the request.
2.      Then Dispatcher Servlet communicate with the HandlerMapping for identifying the suitable controller for given request.
3.      After identifying the suitable controller for the given request HandlerMapping returns the information back to the Dispatcher Servlet.
4 & 5.      Then Dispatcher Servlet dispatches the given request to the controller bean. Controller bean stores the given input in a command class object.
6.      Controller bean calls the business logic implemented in a model.
7 ,8 &9 .      The model can integrate with database and reads or update data.
         Model component returns result back to controller bean.
10.      Controller bean returns model and view object back to Dispatcher Servlet.
11.      Dispatcher servlet communicate the with the view resolver bean and this bean identifies      appropriate view for the given model and view object.
12.  Dispatcher servlet selects the view identified by the view resolver.
            Dispatcher Servlet either forward or redirects the view as a response back to the client.

No comments:

Post a Comment