Spring eingef├╝hrt, um die Tiles-Konfiguration zu vereinfachen
[website] / src / main / webapp / WEB-INF / web.xml
index b6cb19f..3be0c17 100644 (file)
@@ -6,8 +6,56 @@
 
   <display-name>branding</display-name>
 
+  <!-- Context Configuration locations for Spring XML files -->
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>
+      /WEB-INF/spring/mvc.xml
+    </param-value>
+  </context-param>
+
   <listener>
-    <listener-class>org.apache.tiles.web.startup.simple.SimpleTilesListener</listener-class>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
 
+
+  <!-- UTF-8 -->
+  <filter>
+    <filter-name>characterEncodingFilter</filter-name>
+    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+    <init-param>
+      <param-name>encoding</param-name>
+      <param-value>UTF-8</param-value>
+    </init-param>
+    <init-param>
+      <param-name>forceEncoding</param-name>
+      <param-value>true</param-value>
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>characterEncodingFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+
+  <!-- Handles all requests into the application -->
+
+  <servlet>
+    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
+    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    <init-param>
+      <param-name>contextConfigLocation</param-name>
+      <param-value>
+      </param-value>
+    </init-param>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
+    <url-pattern>*.html</url-pattern>
+  </servlet-mapping>
+
 </web-app>