动态包含与静态包含引入其他页面

静态包含,先包含后编译处理,先把页面放在一起之后再一块编译

动态包含 先编译处理,后包含,先自己编译运行好后把结果放在对应的位置

<body>
<%-- <h1>静态包含</h1>
<%@ include file="common/head.html" %>
<p>content</p>
<%@ include file="common/footer.jsp" %> --%>
<h1>动态包含</h1>
<jsp:include page="common/head.html"/>
<p>content</p>
<jsp:include page="common/footer.jsp"/>
</body>

html引入其他页面

 <#include "header.html"/> 
<#include "footer.html" >

猜你喜欢

转载自blog.csdn.net/qq_35029061/article/details/81433407