<jsp:include>在性能上要比<%@ include=...%>差一些,因为可能要被重新编绎,但是它可以带参数:
<jsp:include>
<jsp:param name= value=>
</jsp:cinclue>
<%@ include file=...>一般是包含一个静态页面

解决方案 »

  1.   

    <%@ include file=...>加入的文件其scope是同一个page
    <jsp:include file=...>加入的文件其scope不是同一个page,但是同一个request的。
    这个对于用到session的scope属性时有影响,不过我建议用<jsp:include>毕竟我不知道我们什么时候会改一下include的文件。
      

  2.   

    <%@ include file=...>加入的文件其scope是同一个page
    <jsp:include file=...>加入的文件其scope不是同一个page,但是同一个request的。
    这个对于用到session的scope属性时有影响,不过我建议用<jsp:include>毕竟我不知道我们什么时候会改一下include的文件。
      

  3.   

    <%@ include file="Relative URL" %> Including Files at Page Translation Time
    Changing included file does not necessarily cause retranslation
    of JSP document. You have to manually change JSP document or update its modification date. 
     
    <jsp:include page="Relative URL" flush="true" /> Including Files at Request Time
    The jsp:include action includes files at the time of the cli-
    ent request and thus does not require you to update the main file when anincluded file changes. On the other hand, the page has already been translated into a servlet by request time, so the included files cannot contain JSP.