Home  >  Article  >  Java  >  Java interface garbled solution

Java interface garbled solution

尚
Original
2019-11-26 09:37:262725browse

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" />

is modified to:

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

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!

Statement:
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