I have some fields with special characters. When I pass those fields from JSP by submiting the form to Springs Controller then it is displayed as shown below.
á - á
é - é
í - Ã
ó - ó
ú - ú
ñ - ñ
I tried few things like putting some encoding in web.xml,
<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>
Encoding in Controller like,
request.setCharacterEncoding("UTF-8");
Still I am not able to solve the issue. Please Help.
Thanks in advance.
Note: I checked some of the questions related this question in our stackoverflow, Still not able to find it. Character encoding JSP -displayed wrong in JSP but not in URL: "á » á é » é"