<%@ page contentType="text/html;charset=gb2312" %>抱歉,只能在某种程度上解决如果你要输出数据库里的中文好象还有些麻烦

解决方案 »

  1.   

    在JB中和Visual age for java都可以用GBK来作,也就是charset=GBK,你试试,这样可能就不乱了。
      

  2.   

    在jsp页面的头部加入一下代码
    <meta http-equiv="Content-Type" content="text/html;charset=gb2312">
    <%@ page contentType="text/html;charset=gb2312" %>
    对于页面间的参数传递,可以调用下面这个方法解决乱码问题
    public String getStr(String str)
       {
           try
       {
          String temp_p=str;
      byte[] temp_t=temp_p.getBytes("ISO8859-1");
      String temp=new String(temp_t);
      return temp;
       }
       catch(Exception e)
       {}
       return "null";

    试试吧!