1.修改tomcat的conf路径下的server.xml文件,在端口号那一行添加URIEncoding="UTF-8"
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>
2.在eclipse的安装目录下有一个eclipse.ini文件,在最后一行添加-Dfile.encoding=UTF-8,修改eclipse的默认编码为UTF-8
-Dfile.encoding=UTF-8
3.在eclipse里面:菜单Windows->Preferences -> MyEclipse Enterprise Workbench->Servers->Tomcat,选择tomcat版本例如Tomcat 6.x,再选择JDK,在右侧Optional Java VM arguments:中添加-Dfile.encoding=UTF-8