使用eclipse+Tomcat+mysql做web开发时乱码问题解决

---恢复内容开始---

在eclpse中设置:1.Windows->Preferences->General->Content Types->Text->Default encoding:utf-8

2.Windows->Preferences->General->Workspace->Text file encoding->Other:UTF-8

Tomcat设置:打开Tomcat文件夹下面的conf中的server.xml文件找到

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"/>在其中后面添加URIEncoding="UTF-8"如图:

mysql设置:打开mysql文件夹下的my.ini找到default-character-set和character-set-server将等号后面的值改为utf8

 

---恢复内容结束---

posted @ 2015-05-22 00:16  vstarcui  阅读(766)  评论(0编辑  收藏  举报