问题描述:

  1. 在java中发送使用
    resp.sendRedirect("Message.jsp?msg=错误");
  2. 在jsp中接受使用
    <%= request.getParameter("msg")%>
  3. 出现乱码??,查看网上各种方法都gg



解决方案:

  1. java 中
    req.getSession().setAttribute("msg","错误");
    resp.sendRedirect("Message.jsp");
    
  2. jsp中
    <%= request.getSession().getAttribute("msg") %>

相关文章:

  • 2021-05-15
  • 2021-11-28
  • 2022-01-10
  • 2022-12-23
  • 2021-12-04
  • 2021-12-08
  • 2021-10-27
猜你喜欢
  • 2021-11-28
  • 2021-10-27
  • 2022-02-18
  • 2021-12-29
  • 2021-05-31
相关资源
相似解决方案