<Connector 
port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000" 
               disableUploadTimeout="true" URIEncoding="GBK"/>
这里写上 URIEncoding="GBK"/  再写个filter 不用多说了把
另外 tomcat5.0可以使用JDK1.4 但是session里面的中文就有问题的
建议使用JDK1.5

解决方案 »

  1.   

    网上很多关于中文问题的帖子和文章,找起来是相当多。
    这里就贴一个,看能否解决你的问题。把下面代码放在你的jsp头部。
    <%@page pageEncoding="GB2312"%>
    <%@page contentType="text/html; charset=gb2312"%>
    <%request.setCharacterEncoding("GB2312");%>
      

  2.   

    shezhi设置编码
    <%@page language="java" contentType="text/html; charset=gb2312"%>
      

  3.   

    在代码的最开始加上:
    <%@page pageEncoding="GBK"%>
    <%@page contentType="text/html; charset=GBK"%>
    <%request.setCharacterEncoding("GBK");%>
    就ok了,楼主试试吧!
      

  4.   

    在文件开头加上下面的语句
    <%@page contentType="text/html; charset=GBK"%>
      

  5.   

    顶,我也遇到同样问题,做了一个查询功能,字母数字可以查,中文就查不出来了,在程序里作了一个formatstring的方法想把它中文化,竟然还是一样。郁闷啊