Weyu‘s blog

  • 首页
  • 代码
  • 作品
  • 学习
  • 折腾
  • 随笔
  • 关于博主
  • 时光映像
  • 我的网盘
  • 文章归档
  • 友情链接

页面url传值乱码的解决方案

  • admin
  • 2018-03-05
  • 0

修改默认编码(ISO-8859-1)方法,修改根目录的conf下的server.xml,Connector元素添加URIEncoding=”UTF-8”属性,如下所示:

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" URIEncoding="UTF-8" redirectPort="8443"/>

2、new String(info.getBytes("iso-8859-1"),"UTF-8");

© 2025 Weyu‘s blog
  • {{ item.name }}
  • {{ item.name }}