<%@ page contentType="text/html;charset=GB2312"%>
在<head></head>之间加
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
就可以了

解决方案 »

  1.   

    charset=GBK楼主设了GBK,把top.html也设成GBK 8
      

  2.   

    在top.html的<head></head>之间加
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    试试看
      

  3.   

    两位说的都是一个意思,就是让他们的字符设置成一样的,我试过来了不好用的,我给你们贴出来看看
    top.html中
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    myjsp.jsp中:
    <%@page contentType="text/html; charset=gb2312"%>
    <%@include file="top.html"%>
    还是不好用的
      

  4.   

    myjsp.jsp也加<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      

  5.   

    top.html 第一行加:,%@page contentType="text/html; charset=GBK"%>
      

  6.   

    top.html 第一行加:<%@page contentType="text/html; charset=GBK"%>
      

  7.   

    我在一本书上看过,笔者提到include的时候中文出现乱码(TOMCAT),但在Resin就没有,不过没有说解决办法,观望……
      

  8.   

    在jsp<% %>中加如这条指令:String clientPage = new String(clientPage.getBytes(“ISO-8859-1”),“GBK”);clientPage是你自己定义的对象。
      

  9.   

    在top.html文件头中加入<%@ page contentType="text/html; charset=gb2312%>就可以了
      

  10.   

    我搞定了,只要用String的构造函数转换一下字符编码就行了,还是谢谢上面各位仁兄