用google以“tomcat 中文”为关键字,搜出一大堆

解决方案 »

  1.   

    在JSP程序中调用下面类方法。   
     public  String get_gb (String s_name) {     //用于中文处理
          String s_unicode="" ;
          try
          {   s_name = s_name.trim ();
              byte[] bytes = s_name.getBytes("8859_1");//
               s_unicode = new String(bytes,"GB2312");//
           }
          catch(UnsupportedEncodingException e)
          {
              System.out.println(e.toString());
           }
          return   s_unicode;
       }