Hello,
I had the same problem. Thanks to Stefan Schmidt. I have solved this problem by make CharacterEncodingFilter to the first of filters:
Code:
...
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:META-INF/spring/applicationContext*.xml</param-value>
</context-param>
<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>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
</filter>
... (other filters)
But I'm also have similar problem with encoding values, that comes from @ModelAttribute method in controller.
The code below.
In controller:
Code:
@ModelAttribute("russianWord")
public String populateRussianWord() {
return "Привет";
}
In the view:
Code:
<spring:eval expression="russianWord" />
The result is "Привет", but must be "Привет".
I'm use Roo 1.1.0 RELEASE, Tomcat 6, Windows XP. All file encoding is UTF-8.