Tomcat Chinese path cannot be downloaded

Source: Internet
Author: User

The main cause is the encoding problem.


Because the URI decoding used by Tomcat's HTTP connector is ISO-8859-1 by default,
The general browser uses the default sending code for the UTF-8, this problem will occur,
The initial solution is as follows:
The configuration in server. XML is similar to the following:
<Connector Port = "8080" maxthreads = "150" minsparethreads = "25"
Maxsparethreads = "75" enablelookups = "false" redirectport = "8443"
Acceptcount = "100" DEBUG = "0" connectiontimeout = "20000"
Disableuploadtimeout = "true" uriencoding = "UTF-8"/>
The key here is uriencoding = "UTF-8", which means that the URI is encoded as: UTF-8
After this configuration, restart tomcat to solve the problem of Chinese path and Chinese file name mentioned above.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.