DispatcherServlet Introduction
Class: org.springframework.web.servlet.DispatcherServlets
In Spring MVC DispatcherServlet is the main part.
In Spring MVC request first meets the DispatcherServlet.
It route the request to all components in the Framework.
It can be configured in web.xml file or using Java based configuration.
It also handles requests for static resources(images and stylesheets).
DispatcherServlet xml based Configuration
web.xml
<servlet>
<servlet-name>SpringDispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SpringDispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
Here inside this servlet tag you can specify more configurations as per requirements.
You can configure the profile.
you can configure the springs xml configuration file.