在每个页面前加上以下二句:
<%@ page contentType="text/html; charset=GB2312" %>
<%request.setCharacterEncoding("gb2312");%>

解决方案 »

  1.   

    这个问题与你用的server有关,是用的tomcat还是weblogic?另外,在网上关于java的中文问题讨论很多了,转码你应该试过?
      

  2.   

    插入之前先把它转化成ISO-8859-1。
      

  3.   

    给你一个方法,很有用的。
    楼上的方法适合你在从在jsp页面显示时用,向数据库插入时,你可以用如下的。
    public static String UnicodeToChinese(String s){
      try{
         String newstring=null;
         newstring=new String(s.getBytes("ISO8859_1"),"gb2312");
         return newstring;
        }
      catch(UnsupportedEncodingException e)
      {
      return s;
      }
      }
      

  4.   

    给你看看这个,也许能有点儿帮助。
    http://www.csdn.net/expert/topic/691/691097.xml?temp=.372265