出现的情况:

表单FORM、POST、GET、超链接、sendRedirect()

解决方法:

  如果是POST使用

  HttpRequest.setCharacterEncoding("utf-8");

  如果是GET使用

new String(
                req.getParameter("username")
                        .getBytes("iso-8859-1"),"utf-8");

相关文章:

  • 2021-09-23
  • 2022-03-05
  • 2021-06-04
  • 2021-10-28
  • 2021-04-27
  • 2022-01-03
  • 2021-10-12
  • 2022-12-23
猜你喜欢
  • 2021-12-02
  • 2022-12-23
  • 2021-11-27
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案