Sometimes I also think that I add <% @ page contenttype = "text/html; charset = gb2312" %> in JSP.
Tomcat Chinese transcoding is OK, and later found that I have been suffering from a pain...
The JSP page contains Chinese characters, but it is okay when you look at the JSP page. It does not mean that the jsp url is passed as a value, and the background accepts Chinese encoding, at least what I encounter is garbled characters ???????
Solution
JSP page
Needless to say:
<% @ Page Language = "Java" contenttype = "text/html; charset = GBK" %>
Tomcat transcoding:
Find the tomcat installation directory -->
In my tomcat installation directory, C:/Java/Apache-Tomcat-6.0.29/conf contains server. xml
This section:
<Connector Port = "8080" protocol = "HTTP/1.1"
Connectiontimeout = "20000"
Redirectport = "8443" type = "regxph" text = "yourobjectname"/>
Changed:
<Connector Port = "8080" protocol = "HTTP/1.1"
Connectiontimeout = "20000"
Redirectport = "8443" uriencoding = "GBK"/>
Stop Tomcat ----> start Tomcat
If you try to pass the URL parameter, it will still be ???? ?
My problem is solved. Summary:
If you use the POST method, this may not happen, but the get method is not necessarily. In addition, I don't want to talk about it anymore. It's a bit of a problem, so I'm tired of talking nonsense.
I hope I can remember my mistakes.