Stepped pit documentary ---- tomcat deployment front-end server can not access the Chinese folder or Chinese file name problem

 

Modify tomcat's server.xml file (the file containing the resolve of the Chinese, the picture can not download, display problems): Locate the following configuration information in the xml file, add the parameter can be bold part ( disableUploadTimeout = "to true" URIEncoding = "UTF-. 8 ")

Note that URI is not a URL

<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000" 
disableUploadTimeout="true" URIEncoding="UTF-8"/>

 

ROOT start getting permission to operate
-bash-4.1 $ su -
Password:
already gained root privileges
[root @ TY-KOUHUO-AP01 ~] # cd /var/opt/.mycat/

[root @ TY-KOUHUO-AP01 .mycat] # cd bin into the bIN directory
[root @ TY-KOUHUO-AP01 bin] # ll show content
Vim is the editor of meaning, startup.sh is to start tomcat code,
[root @ TY-KOUHUO-AP01 bin] # vim startup.sh
[root @ TY-KOUHUO-AP01 bin] # cd ../conf/ return to parent directory to find the port number file
[root @ TY-KOUHUO-AP01 conf] # LL
[root @ TY-KOUHUO-AP01 conf] # vim Server Check the port number .xml file
input i can edit the file
: wq save
lowercase q represents the force quit
[root @ TY-KOUHUO-AP01 conf] # cd ../webapps/
[root @ TY-KOUHUO-AP01 webapps] # LL
[root @ TY-KOUHUO-AP01 ~] # history View history commands
to press the ESC key and then a colon: P then you can exit the vim View edit documents
[root @ ZK-SFC-0902 ~] # ps -ef | grep java
the SFC @-ZK-the root ~ 0902] CD # / var / opt
[the root @ ZK-opt the SFC-0902] # CD /var/opt/tomcat8.5
[the root @ ZK-bin the SFC-0902] This is the LL LL #
root @ ZK-SFC-0902 bin ] # vim startup.sh this is that you want to edit this document mean [root @ ZK-SFC-0902 tomcat8.5] # ./bin/startup.sh after executing this command will open tomcat La

 

 

tomcat deployment front-end server can not access the Chinese folder or Chinese file name problem

The core problem is that modify Tomcat configuration, add a property named in URIEncoding Server.xml file, which is used for HTTP requests get, post method pass over the URL encoded. ( Provided that you have written code encoding is UTF-8)

1, find the section in the figure below Server.xml, then add the red part:

 

 

 

Because if you download Apache Tomcat directly from the site, whether installed version exe file, or unzip the ZIP file, built for URL encoding get agreement are ISO-8859-1, this character set does not directly support Chinese, etc. Double-byte of information.

Then restart tomcat should be able to access files Chinese name of the file.

 

Guess you like

Origin www.cnblogs.com/sugartang/p/12179335.html