1. 问题描述:

tomcat中如果URL中需要传递中文参数,需要配置tomcat的service.xml中文传递的编码方式,否则中文传递将出现乱码,导致程序异常。

2. 解决方式:

修改tomcat配置文件:

修改tomcat配置文件service.xml:URIEncoding="UTF-8"
<Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" URIEncoding="UTF-8"/>    

 

相关文章:

  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2021-08-04
  • 2021-12-26
  • 2021-12-11
  • 2021-10-16
  • 2022-12-23
猜你喜欢
  • 2022-02-20
  • 2021-11-18
  • 2021-11-10
  • 2021-09-18
  • 2022-01-25
  • 2021-08-04
相关资源
相似解决方案