Spring eingef├╝hrt, um die Tiles-Konfiguration zu vereinfachen
[website] / src / main / webapp / WEB-INF / web.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
3   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
5   version="2.5">
6
7   <display-name>branding</display-name>
8
9   <!-- Context Configuration locations for Spring XML files -->
10
11   <context-param>
12     <param-name>contextConfigLocation</param-name>
13     <param-value>
14       /WEB-INF/spring/mvc.xml
15     </param-value>
16   </context-param>
17
18   <listener>
19     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
20   </listener>
21
22
23   <!-- UTF-8 -->
24   <filter>
25     <filter-name>characterEncodingFilter</filter-name>
26     <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
27     <init-param>
28       <param-name>encoding</param-name>
29       <param-value>UTF-8</param-value>
30     </init-param>
31     <init-param>
32       <param-name>forceEncoding</param-name>
33       <param-value>true</param-value>
34     </init-param>
35   </filter>
36
37   <filter-mapping>
38     <filter-name>characterEncodingFilter</filter-name>
39     <url-pattern>/*</url-pattern>
40   </filter-mapping>
41
42
43   <!-- Handles all requests into the application -->
44
45   <servlet>
46     <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
47     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
48     <init-param>
49       <param-name>contextConfigLocation</param-name>
50       <param-value>
51       </param-value>
52     </init-param>
53     <load-on-startup>1</load-on-startup>
54   </servlet>
55
56   <servlet-mapping>
57     <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
58     <url-pattern>*.html</url-pattern>
59   </servlet-mapping>
60
61 </web-app>