Skip to content

Commit c3ef5ed

Browse files
author
eugenp
committed
MVC work
1 parent e9e91d8 commit c3ef5ed

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎spring-mvc-no-xml/src/main/webapp/WEB-INF/web.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<url-pattern>/</url-pattern>
3636
</servlet-mapping>
3737

38+
<!-- additional config -->
39+
3840
<welcome-file-list>
3941
<welcome-file>index.html</welcome-file>
4042
</welcome-file-list>

spring-mvc-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java renamed to spring-mvc-xml/src/main/java/org/baeldung/spring/ClientWebConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.baeldung.spring.web.config;
1+
package org.baeldung.spring;
22

33
import org.springframework.context.annotation.Bean;
44
import org.springframework.context.annotation.Configuration;

‎spring-mvc-xml/src/main/webapp/WEB-INF/web.xml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,24 @@
66
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
77
id="WebApp_ID" version="3.0">
88

9-
<display-name>Spring MVC Application</display-name>
9+
<display-name>Spring MVC XML Application</display-name>
1010

1111
<!-- Spring root -->
12+
<context-param>
13+
<param-name>contextClass</param-name>
14+
<param-value>
15+
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
16+
</param-value>
17+
</context-param>
1218
<context-param>
1319
<param-name>contextConfigLocation</param-name>
14-
<param-value>/WEB-INF/mvc-servlet.xml</param-value>
20+
<param-value>org.baeldung.spring</param-value>
1521
</context-param>
1622

1723
<listener>
1824
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
1925
</listener>
20-
26+
2127
<!-- Spring child -->
2228
<servlet>
2329
<servlet-name>mvc</servlet-name>
@@ -29,6 +35,8 @@
2935
<url-pattern>/</url-pattern>
3036
</servlet-mapping>
3137

38+
<!-- additional config -->
39+
3240
<welcome-file-list>
3341
<welcome-file>index.html</welcome-file>
3442
</welcome-file-list>

0 commit comments

Comments
 (0)