I'm developing a JAVA application with the Spring framework v3.1.0, but when trying to access a page it has an encoding error:
Evolution
How to solve this problem? I found several paths, but none worked:
<servlet-container name="default" use-listener-encoding="true" default-encoding="UTF-8">
<jsp-config/>
<websockets/>
</servlet-container>
But it did not work, I also tried to put the filter in the web.xml file:
<filter>
<filter-name>encoding-filter</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>encoding-filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
I also put the encoding type in the header, and it also did not work:
<%@ page language="java" contentType="text/html; charset=UTF-8;" pageEncoding="UTF-8" %>
Of course, I also tried to pass this information via HTML:
<meta charset="UTF-8" />
The JSP file is also in UTF-8 and the browser as well.
Does anyone have a solution to this problem? This is my first application in this technology, I'm picking up on these things.
Thank you in advance.