Exactly!The included file has no permission to change the headers,and other things.Caze the included file like a part of his parent.The parent control all of the http headers and cookies.<jsp:include page="shoppingcart.jsp" flush="true"/>
This line will be translate to JspRuntimeLibrary.include(request, response, "shoppingcart.jsp", out, true);

解决方案 »

  1.   

    它是说不能包含HTTP头,这样可以排除那些要设置cookies之类的代码,否则会抛出一个异常
      

  2.   

    不能设置cookie的值吗,不能新增cookie吗.还有这里说的异常,说的是不是出错页的设置(<%@ isErrorPage="false" errorPage="errorPage.jsp" %>
      

  3.   

    flush="true"是说在页面被引入前,应答主体必须被排空。因此,被引入的页面将无法设置首部(例如cookie或重定向的首部),也无法转发到另一个页面。这同时意味着在<jsp:include>行为元素被执行之后,主页面也无法设置首部和进行转发了。