---
title: "tomcat 不能访问中文名称文件"
author: "tcspecial"
date: "2012-12-04T10:24:12Z"
tags: []
categories: ["Web前端"]
slug: "tomcat"
draft: false
lastmod: "2012-12-04T10:24:12Z"
id: 1740657
url: "https://tcspecial.iteye.com/blog/1740657"
---

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

 

    ![下载失败](http://dl.iteye.com/upload/attachment/0077/4144/d5536dfc-e822-331a-b351-58005f0a71e9.jpg)

 

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

 

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

 

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