title: Adding multiple servlets in single web.xml
body: <p>I am trying to run two Servlet-class in a single web.xml but its not working, each servlet-class works fine independently.</p>
  
  <p><code>web.xml</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;servlet&gt;
      &lt;servlet-name&gt;spring-ws&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.ws.transport.http.MessageDispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;transformWsdlLocations&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;spring-ws&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;session-config&gt;
      &lt;session-timeout&gt;240&lt;/session-timeout&gt;
  &lt;/session-config&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/spring-ws-servlet.xml
       /WEB-INF/health-page-servlet.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;health-page&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;health-page&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/health.htm&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Do let me know if you can figure something wrong that i am doing.</p>
  
  <p>I tried the below link but it doesnt work for me
  <a href="https://stackoverflow.com/questions/4078795/can-i-use-spring-mvc-and-spring-ws-in-one-single-application">Can I use Spring MVC and Spring WS in one single application?</a></p>