<%@ page contentType="text/html;charset=gb2312" %>

解决方案 »

  1.   

    response.setContentType("text/html;chatset=gb2312");
      

  2.   

    这段代码在Resin中正常,但在websphere就是乱码!
      

  3.   

    加一句request.setCharacterEncoding("GB2312");
    OK
      

  4.   

    加这句肯定行的,兄弟:)
    request.setCharacterEncoding("GB2312");
      

  5.   

    to:  kreven(天地无用恨离别)  &  kreven(天地无用恨离别)
    编译错误!
      

  6.   

    检查Servlet,页面中"text/html;charset=gb2312"
    不能重复使用
      

  7.   

    如果都不行,就试这句话
    out.println("alert('成功!');");
    改成
    out.println("alert('new String("成功".getBytes(GB2312),"ISO8859-1")!'));
    这样不行就编码集换换,看看行不行?
      

  8.   

    to:charbee(char) 
    出错,提示对象不支持该属性或方法。
      

  9.   

    试试这个
    response.setContentType( "text/html; charset=GBK");
    request.setCharacterEncoding("GB2312");
    //这个是取得querystring参数时要用的,不然中文参数就变成问号。不是显示时用的