使用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

 

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

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。