系统设置中设定local为gbk

解决方案 »

  1.   

    welcom.jsp中显示的信息是从数据库里取出的吗?如果是用一下的方法在servlet中进行转换
    String in = "";//in是要显示的内容
    byte[] temp =in.getBytes("iso-8859-1");
    String s = new String(temp);
    你可以搜索一下中文问题的帖子作为参考
      

  2.   

    welcome.jsp中的汉字不是从数据库里取出的。
      

  3.   

    to: ZeroC(笨小孩)
    系统设置中设定local为gbk,
    怎么设置,在哪设置,还麻烦指教一下。谢。
      

  4.   

    在servlet的doGet的最开始调用
    response.setContentType("text/html;charset=gbk");
      

  5.   

    String s1=new String(s.getBytes("iso-8859-1"),"GBK");