<jsp:include flush="true" page="/inc/header.jsp">页面显示会出现乱码,但是用<@include file="/inc/header.jsp">显示则正常  什么原因

解决方案 »

  1.   

    <%@ page language="java" contentType="text/html; charset=GBK"
          import="java.util.*"%>
    <html>
    <head>
    <title>欢迎学习JSP</title>
    </head>
    <body>
    <%
    Calendar c1=Calendar.getInstance();
    c1.setTime(new Date());
    int month=c1.get(Calendar.MONTH);
    %>
     当前月份是:
     <%=month %>
     <br>
    <%--<%@ include file="hello.jsp"%>--%>
    <jsp:include page="hello.jsp" flush="true"%>
    </body>
    </html>不是乱码,直接报错来着
      

  2.   

    你的动态参数导入时就有点问题,为什么动态导入时就没有file属性了?。。
      

  3.   

    终于找到错误了  总是犯这种低级错误啊 一个小地方折腾这么久
    <jsp:include page="hello.jsp" flush="true"%>
    改为
    <jsp:include page="hello.jsp" flush="true"/>