Spring MVC is a web application used to develop applications using enterprise Java.Web framework built around the basis of Spring. Model view controller made to simplify the writing and testing of Java web applications. MVC fully integrates with the spring dependency injection framework. MVC was developed and maintained by interface21, recently purchased by VMware. The conceptual figure of MVC as shown below.
DispatcherServlet
The MVC framework was completely constructed with DispatcherServlet.It can manage the request and response at HTTP. Sequence of events corresponding to an incoming Http request to DispatcherServlet is as follows.
DispatcherServlet asks the HandlerMapping to alert the controller after receiving an HTTP request.
Where the controller grants the request and alerts the service method by using the GET or POST method.
Here ViewResolver checks the view of request.
The View will consist of model data finally it will be displayed on the browser.
Parts of WebApplicationContext are as follows.
HandlerMapping
Controller
ViewResolver
The extension of WebApplicationContext is PlainApplicationContext.
MVC Overview
Spring MVC framework gives model view controller architecture .The components of MVC used to provide flexible and loosely coupled web applications.
The Model indicates an object.it also has the chance to update the data if anything changes.
Visualization of the information will be indicated by view.
The functionality of control is, it can perform as view and model.
Defining the DispatcherServlet
Spring MVC framework will be built around the environment of DispatcherServlet.
[java]
<servlet>
<servlet-name>Spring</servlet-name>
<servlet-class>org.springframework.web.servlet.dispatcherServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>
</servlet-mapping>
[/java]
Summary
Key Points
DispatcherServlet manages the flow of Spring MVC application.
MVC was developed and maintained by interface21,recently purchased by VMWare.
Spring MVC framework will be built around the environment of ispatcherServlet.