在你的resin.conf文件中的开发目录设置:如:
 <web-app id='/om' app-dir='/om' character-encoding='GB2312'>
       <classpath id='classes'
                 source='src'
                 compile='true'/>
......
试试看

解决方案 »

  1.   

    我用的是resin2.1.0,没有找到你说的那和段,不过我曾经改过下面这段:<!--
       - Use precompiled JSP classes if available.
       - 'static-encoding' - optimization if you stick to one character set
      -->
    <jsp precompile='true' static-encoding='GB2312' recompile-on-error='true'/>我这样改过,但还是不行。GB2312我也改用过ISO8859-1也不行!
      

  2.   

    http://expert.csdn.net/Expert/topic/1582/1582340.xml?temp=.6192285
    这个帖子里面去看看,希望能帮助你
      

  3.   

    你可以看看我这个得分的例子
    http://expert.csdn.net/Expert/topic/1529/1529097.xml?temp=.9971582我简单总结一下:
    数据库存储最好用8859_1的格式,
    所以存入数据库的时候进行一下编码转换,但我们通常的显示格式为GB2312或GBK,所以取出来的时候再转一次例如:存入数据库时用:
    把数据转成8859_1的格式
    name=new String(name.getBytes("gb2312"),"8859_1");
    content=new String(content.getBytes("gb2312"),"8859_1");insert into (name,content)values(?,?).......从数据库取的时候用:
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost/gfqqqqpe?user=gfqqqqpe_f&password=aaaaa&useUnicode=true;characterEncoding=8859_1");
    从数据库取的时候指定编码方式为“8859_1”,
    然后显示的时候进行转换:
    name=new String(name.getBytes("8859_1"),"gb2312");
    这种方法在MYSQL上通用