Many jsp programmers have encountered such a situation. The jsp page passes parameters to the servlet. As long as the parameters are in Chinese, they are garbled, and most of them are? ? ? ? ? ? The code is garbled. I tried many common methods on the Internet but nothing worked. Finally, I added a sentence to solve the problem. I share it here for your reference.
1. Open the tomcat installation directory
2. Find the conf folder
3. Open the server.xml inside
4.find
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
this label
5. Add at the end of the tag
URIEncoding="UTF-8"
this sentence
becomes as follows:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>
This problem is solved!