Simple Spring/Thymeleaf-App
[examples/maven-grunt-integration] / 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_3_1.xsd"
5   version="3.1">
6
7   <display-name>maven-grunt-integration</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       classpath:/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
25   <filter>
26     <filter-name>characterEncodingFilter</filter-name>
27     <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
28     <init-param>
29       <param-name>encoding</param-name>
30       <param-value>UTF-8</param-value>
31     </init-param>
32     <init-param>
33       <param-name>forceEncoding</param-name>
34       <param-value>true</param-value>
35     </init-param>
36   </filter>
37
38   <filter-mapping>
39     <filter-name>characterEncodingFilter</filter-name>
40     <url-pattern>/*</url-pattern>
41   </filter-mapping>
42
43
44   <!-- Handles all requests into the application -->
45
46   <servlet>
47     <servlet-name>Dispatcher Servlet - Maven/Grunt-Integration</servlet-name>
48     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
49     <init-param>
50       <param-name>contextConfigLocation</param-name>
51       <param-value>
52       </param-value>
53     </init-param>
54     <load-on-startup>1</load-on-startup>
55   </servlet>
56
57   <servlet-mapping>
58     <servlet-name>Dispatcher Servlet - Maven/Grunt-Integration</servlet-name>
59     <url-pattern>/</url-pattern>
60   </servlet-mapping>
61
62 </web-app>