December 28 2015

Spring MVC Dispatcher Servlet

Spring MVC Dispatcher Servlet

Spring Web MVC framework is designed around the Front controller which is DispatcherServlet. DispatcherServlet is a servlet implemented as a subtype of HttpServlet. It is responsible for initializing the Spring Web MVC framework.

DispatcherServlet listens to the incoming requests and dispatches the request to handler,configurable handler mapping, view resolvers, local and theme resolvers. It has to be configured in web.xml

In the below web.xml, DispatcherServlet is declared as servlet to use spring-beans.xml and to intialize WebAplicationContext. According to the servlet-mapping, Web Container will dispatch all the request for the context whose servlet path ends with .htm to DispatcherServlet.


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi=""
 xmlns="" xmlns:web=""
 id="WebApp_ID" version="2.5">

Copyright © 2014. All rights reserved.

Posted December 28, 2015 by answersz in category Spring

Leave a Comment

Your email address will not be published. Required fields are marked *