首页 > 编程知识 正文

tomcat控制台中文乱码,tomcat乱码怎么解决

时间:2023-05-05 07:20:58 阅读:14805 作者:445

1、进入tomcat安装路径----

包含tomcat的安装目录/conf目录/server.xml文件

连接连接时间=' 20000 '端口=' 8080 '协议=' http/1.1 ' redirect port=' 8443 ' /

修改如下。

connectoruriencoding=' utf-8 ' connection time out=' 20000 ' port=' 8080 ' protocol=' http/1.1 ' redirect port=' 8400

或者

connectoruriencoding=' utf-8 ' allow trace=' false ' connection time out=' 2000 ' maxkeepaliverequests='1' max threads

加入uri编码=' utf-8 '

2、进入eclipse中的Service文件夹,进入tomcat目录。 打开service.xml

连接连接时间=' 20000 '端口=' 8080 '协议=' http/1.1 ' redirect port=' 8443 ' /

修改如下。

connectoruriencoding=' utf-8 ' connection time out=' 20000 ' port=' 8080 ' protocol=' http/1.1 ' redirect port=' 8400

或者

connectoruriencoding=' utf-8 ' allow trace=' false ' connection time out=' 2000 ' maxkeepaliverequests='1' max threads

加入uri编码=' utf-8 '

实际上,这两种方法的效果都相同,只要在eclipse中进行修改,然后重新启动tomcat,它们就会自动同步到安装目录下的service.xml文件中

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。