ITeye博客

tomcat 不能访问中文名称文件

tcspecial · 2012-12-04 10:24 · java · Web前端 · Markdown

Tomcat 6.0 下下载中文名称的文件,会报404错误

 

    下载失败

 

   根据错误发现中文名称被转化了,因此必然找不到%E5%AE....xls这样的文件

 

   解决方案: 在server.xml 加入URIEncoding="UTF-8"就行了

 

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。