This commit is contained in:
eugenp 2013-07-26 11:40:11 +03:00
parent e9e91d8019
commit c3ef5ed5e4
3 changed files with 14 additions and 4 deletions

View File

@ -35,6 +35,8 @@
<url-pattern>/</url-pattern> <url-pattern>/</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- additional config -->
<welcome-file-list> <welcome-file-list>
<welcome-file>index.html</welcome-file> <welcome-file>index.html</welcome-file>
</welcome-file-list> </welcome-file-list>

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.web.config; package org.baeldung.spring;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -6,18 +6,24 @@
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0"> id="WebApp_ID" version="3.0">
<display-name>Spring MVC Application</display-name> <display-name>Spring MVC XML Application</display-name>
<!-- Spring root --> <!-- Spring root -->
<context-param>
<param-name>contextClass</param-name>
<param-value>
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
</param-value>
</context-param>
<context-param> <context-param>
<param-name>contextConfigLocation</param-name> <param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/mvc-servlet.xml</param-value> <param-value>org.baeldung.spring</param-value>
</context-param> </context-param>
<listener> <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> </listener>
<!-- Spring child --> <!-- Spring child -->
<servlet> <servlet>
<servlet-name>mvc</servlet-name> <servlet-name>mvc</servlet-name>
@ -29,6 +35,8 @@
<url-pattern>/</url-pattern> <url-pattern>/</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- additional config -->
<welcome-file-list> <welcome-file-list>
<welcome-file>index.html</welcome-file> <welcome-file>index.html</welcome-file>
</welcome-file-list> </welcome-file-list>