JBuilder中也是用的tomcat啊,会有什么问题吗?

解决方案 »

  1.   

    开发文档中jsp中有文章,看看,先.
      

  2.   

    <%@ page contentType="text/html; charset=gb2312" %>
    用这个试试
      

  3.   

    是unicode的内码问题,
    你需要转化内码,给你一个方法:
        public static String toGB(String fstrMsg)
        {
            String lstrReturn = null;
            if (fstrMsg == null)
            {
                return "";
            }
            try
            {
                lstrReturn = new String(fstrMsg.getBytes("8859_1"),"GB_2312");
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }
            return lstrReturn;
        }
    8859_1是国际标准码,GB_2312是中文,
    你可以自己随意转换成各种编码。
    我刚来csdn
    别忘了给我加分,谢谢