其他页面包含<%@ include file="menu.jsp"%>,为什么包含的地方是乱码啊
menu.jsp内容:<div class="b_menu">
<li><a href="main.jsp">论坛首页</a></li>
<li><a href="#">文章</a></li>
<li><a href="#">列表</a></li>
</div>

解决方案 »

  1.   

    你要在main.jsp中也加入
    <%@ page language="java" contentType="text/html; charset=GB2312"%>
    这样的代码......
      

  2.   


    你要在menu.jsp和main.jsp中也加入
    <%@ page language="java" contentType="text/html; charset=GB2312"%>
    这样的代码......
      

  3.   

    我遇到此种问题是如果包含的页面是静态时(HTML,SHTML)时,包含<%@ include file="menu.jsp"%>时是乱码?JSP包含JSP没遇到过
      

  4.   

    我遇到过(HTML)包含出现乱码?高手啊,出来啊
      

  5.   

    提示我:menu.jsp(1,1) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=GBK, new: text/html; charset=GB2312)
      

  6.   

    http://www.boxigroup.com B/S、C/S、数据库开发帮助网站、欢迎光临 BS+CS群(9638134)
      

  7.   

    <jsp:include page="xxx.jsp" flush="true"/>用这个包函
      

  8.   

    <%@ page contentType="text/html; charset=GBK" %> 加上这个
      

  9.   

    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    应该加这个。
      

  10.   

    menu.jsp(1,1) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=GBK, new: text/html; charset=GB2312)
    ---------------
    我 也是这样的,加上下面的语句就可以了。
    <%@page contentType="text/html;charset=gb2312"%>
    被包含页面和包含页面都加上,而且要一致。就可以了。
      

  11.   

    在一个编码为utf-8的页面中,使用include包含另一个.jsp文件时遇到乱码问题。被包含页面t.jsp只是一些html代码。解决办法为在被包含页面t.jsp中加入如下代码<%@page contentType="text/html;charset=utf-8"%>并且要在dreamweaver中  点击 修改->页面属性->标题/编码  设置为utf-8   使t.jsp和包含它的页面编码方式完全一致。