...
There is an issue with mapping the DispatcherServlet in servlet servlet 3.0 in some version versions of Tomcat and JBoss.
These containers will fail to map the DispatcherServlet via the AbstractDispatcherServletInitializer because Tomcat and JBoss already register a default Servlet on "/".
More info on http://docs.spring.io/autorepo/docs/spring-framework/3.1.x/javadoc-api/org/springframework/web/WebApplicationInitializer.html, from this page:
Info |
---|
Mapping to '/' under Tomcat Apache Tomcat maps its internal DefaultServlet to "/", and on Tomcat versions <= 7.0.14, this servlet mapping cannot be overridden programmatically. 7.0.15 fixes this issue. Overriding the "/" servlet mapping has also been tested successfully under GlassFish 3.1. |
See also:
http://stackoverflow.com/questions/20666513/spring-java-config-vs-jboss-7
http://stackoverflow.com/questions/10852985/jboss-as-7-map-servlet-to-context-root-via-code-config