Home > Java > JavaBase > Java interface garbled solution

Java interface garbled solution

Release: 2019-11-26 09:37:26
Original
2751 people have browsed it

Java interface garbled solution

When uploading Chinese information through the interface, garbled characters will appear when request.getParameter() is used to obtain the value in the java background. Various transcodings were used in the code but were not processed. (Recommended java related video tutorials: java video tutorials)

Needs to be modified in the tomcat configuration file:

/conf/server.xml

Original :

<Connector port="8080" protocol="HTTP/1.1"
      connectionTimeout="20000"
      redirectPort="8443" />
Copy after login

is modified to:

<Connector port="8080" protocol="HTTP/1.1"
      connectionTimeout="20000"
      redirectPort="8443" URIEncoding="utf-8" />
Copy after login

For more java related articles, please pay attention to the java basic tutorial column.

The above is the detailed content of Java interface garbled solution. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template