]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1243] Encoding issues with Archiva UI: add Spring CharacterEncodingFilter
authorMaria Odea B. Ching <oching@apache.org>
Wed, 2 Sep 2009 11:25:55 +0000 (11:25 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Wed, 2 Sep 2009 11:25:55 +0000 (11:25 +0000)
submitted by Julien Henry
o add filter to force utf-8 encoding

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@810457 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml

index 11364cb48c06d6593a484f0878c10979efee0861..b4fb373d0ba5ab3111c5184cd8ee65b76961c734 100644 (file)
           <filter-name>webwork</filter-name>
           <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
         </filter>
+        
+       <filter>
+               <filter-name>encodingFilter</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>encodingFilter</filter-name>
+               <url-pattern>/*</url-pattern>
+       </filter-mapping>
 
        <!-- this must be before the sitemesh filter -->
        <filter-mapping>