JSP page link Chinese filename cannot find page __js

Source: Internet
Author: User


Turn from: http://yafei.iteye.com/blog/1087502


For example: <a href= "upload\admin\51\ name. txt" target= "_blank" > name. txt </a> when I clicked on this link, I always said I couldn't find this file.  However, the name. txt file does exist under this folder. But if it is: <a href= "Upload\admin\51\readme.txt" target= "_blank" > Readme.txt </a> when i click on this link, I can open this    File ... I think it might be a transcoding problem, but I don't know how to do it.
Answer: Tomcat's Server.xml file
XML code <connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" Redire ctport= "8443"/>

Change to XML code <connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" red Irectport= "8443" uriencoding= "UTF-8"
/>


The cause of this problem is that Tomcat is used by default to handle the Iso8859-1 encoding, and iso8859-1 does not support Chinese, of course, can not access the Chinese path, and to support the Chinese UTF-8 is OK

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.