View RSS Feed

Spring Framework

Spring Servlet Dispatcher

Rate this Entry
by , 07-07-2012 at 07:36 PM (2777 Views)
The DispatcherServlet provides the base for Spring web model view controller framework. The DispatcherServlet handles all the HTTP responses and requests. The below diagram explains the request processing workflow based on the Spring Web MVC DispatcherServlet.

Name:  1.jpg
Views: 5953
Size:  28.0 KB
Spring Servlet Dispatcher

For an incoming HTTP request, following sequence of events are generated.
The HandlerMapping is consulted to call the related Controller when an HTTP request is received.
The appropriate service method is called based on GET or POST methods after request is taken by the Controller. Based on business logic the model data will be set by the service and it will return view name to DispatcherServlet.
The ViewResolver will help the DispatcherServlet to find and pick exact view for the HTTP request.
The model data is passed by the DispatcherServlet once view is finalized which will be rendered on web browser.

Submit "Spring Servlet Dispatcher" to Facebook Submit "Spring Servlet Dispatcher" to Digg Submit "Spring Servlet Dispatcher" to Submit "Spring Servlet Dispatcher" to StumbleUpon Submit "Spring Servlet Dispatcher" to Google