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
