在eclipse工程中,配置了自定义的tomcat之后,如果开发过程中出现了乱码,需要设置tomcat的编码的时候怎么办?

问题描述:在tomcat下conf文件下,直接编辑server.xml,在<ConnectorconnectionTimeout="20000" port="8081" protocol="HTTP/1.1" redirectPort="8443"/> 中添加 URIEncoding="UTF-8" ,这样修改只能是在eclipse外部启动时可以,只要在eclipse中启动就会将编码设置还原,所以这种方式失败

正确做法:在server界面中,如果已经添加了tomcat,则双击tomcat进入设置页面

eclipse如何设置tomcat的编码eclipse如何设置tomcat的编码

2、点击Open launch configuration,在Environment下添加URIEncoding,然后点击apply,重启eclipse即可

eclipse如何设置tomcat的编码eclipse如何设置tomcat的编码

相关文章:

  • 2021-07-22
  • 2022-01-11
  • 2022-01-11
  • 2022-01-03
  • 2021-04-24
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2022-01-07
  • 2021-10-30
  • 2021-06-12
  • 2021-11-19
相关资源
相似解决方案