解决方案:

  1. url中传值,设置Firefox的参数传递编码:url = "tooltipDisplayAction.te?key=" + encodeURIComponent(key); 即是encodeURIComponent
  2. 在Struts的action中添加接受数据的参数设置:request.setCharacterEncoding("UTF-8");  
      response.setHeader("Content-Type", "text/html;charset=UTF-8");
      String key = request.getParameter("key");
  3. 如果还不行,就将js,jsp文件的编码改为GBK或者utf-8

  <%@ page language="java" contentType="text/html; charset=utf-8"
      pageEncoding="utf-8"%>

 

    

相关文章:

  • 2021-07-08
  • 2021-05-26
  • 2021-09-04
  • 2021-05-30
  • 2021-12-20
  • 2021-07-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案