JAVA中为什么 传中文参数上去 接收的却是乱码呢?
该怎么解决?

解决方案 »

  1.   

    request.setCharacterEncoding("gb2312");
    String   strMsg=new   String(request.getParameter("msg").getBytes("ISO8859_1"),"gb2312");
      

  2.   

    我在这个贴子里,帮你回答了两遍,你竟都没有看到。555555~~~~http://community.csdn.net/Expert/TopicView3.asp?id=5651137
      

  3.   

    在接收页面写上request.setCharacterEncoding("gb2312");就好了,
    其它的不用写了
      

  4.   

    当然在JSP页面上一定要写上
    <%@ page contentType="gb2312"%>