這是JSP種引用的一些方式,這只是body中的部分,具體的請結合實際的項目做鏈接:
<body style="background-color:pink">
<form action="">
<h1>下面顯示的是自定義標籤中的內容</h1>
<br><br>
<br>
<SPAN style="BACKGROUND-COLOR: rgb(255,255,255)"><!-- 第一種:jstl import --></SPAN>
<div style="color:red;">
<c:import url="inlayingJsp.jsp"></c:import>
</div>
<SPAN style="BACKGROUND-COLOR: rgb(255,255,255)"><!-- 第二種:jsp include指令 --></SPAN>
<div>
<%@ include file="inlayingJsp.jsp" %>
</div>
<SPAN style="BACKGROUND-COLOR: rgb(255,255,255)"><!-- 第三種:jsp include動作 --></SPAN>
<div>
<jsp:include page="inlayingJsp.jsp" flush="true"/>
<!-- 傳入參數時用 <jsp:param name="parameterName" value="{parameterValue | EL表達式 }" /> -->
</div>
</form>
</body>
其中還有別的引用方式就不在這裏累述了。