2
votes

My Spring 3 project is configured with three filters: encoding, spring-security, urlRewrite. I have done all things needed in regarding of encoding according to this document: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding. I, however, can't get the string encoding correctly. As a result, I need to make the encoding conversion to get the encoding right. According to the document, a utf-8 filter is the only thing needed to solve this problem. I test the filter. If I remove the filter or place it as the second in the filter order, the request encoding will be null and the response encoding will be ISO-8859-1 on a controller while request encoding is null and response encoding is utf-8 in a JSP file. And removing the filter has not any impact on the form data from the POST method.

I run out of idea. Anything missing?

1
I'm not 100% clear on what is going wrong. I understand you've got an encoding issue, I just can't see what it is. Explain that, and show us what you've done so far. - GaryF

1 Answers

0
votes

Never mind. I have found the source of this problem: Spring Tool Suite or STS. The code works fine outside of STS.