(不知道怎么写才好)

分两种情况:

1、如果是 get 方式

单独修改: new String(str.getBytes("原来的编码"), "想要的编码")

全局修改:在项目中,server.xml 中找到 <Connector>标签,在里面添加 URIEncoding="编码"  注意大小写

2、如果是 post 方式

request.setCharacterEncoding("编码");

相关文章:

  • 2021-12-19
  • 2021-12-24
  • 2022-12-23
  • 2021-09-11
  • 2021-12-24
  • 2021-10-17
  • 2021-11-05
  • 2022-01-02
猜你喜欢
  • 2021-08-08
  • 2022-12-23
  • 2021-11-21
  • 2021-05-25
  • 2021-12-24
  • 2021-11-20
相关资源
相似解决方案