文件头加
<%@ page contentType="text/html;charset=gb2312"%>

解决方案 »

  1.   

    公司的一个同事给我解决了该问题。方法如下:
    使用JDBC连接数据库的时候,使用如下方式:
    con=DriverManager.getConnection("jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=gb2312");然后就可以正常显示中文了。不是"<%@ page contentType="text/html;charset=gb2312"%>
    "的问题。
      

  2.   

    con=DriverManager.getConnection("jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=gb2312");好像不行