File tree Expand file tree Collapse file tree
spring-mvc-no-xml/src/main/webapp/WEB-INF Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1- package org .baeldung .spring . web . config ;
1+ package org .baeldung .spring ;
22
33import org .springframework .context .annotation .Bean ;
44import org .springframework .context .annotation .Configuration ;
Original file line number Diff line number Diff line change 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 >
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 >
You can’t perform that action at this time.
0 commit comments