개발/JSP

[JSP] include 사용하기

suniverse 2023. 1. 23. 22:47

<%@ include %>를 사용하여 현재 페이지에 다른 문서를 포함시킬 수 있다 

 

<header>
    <%-- test4_top.jsp 페이지를 현재 위치에 포함(include) 시키기 --%>
    <%@ include file="test4_top.jsp" %>
</header>
<hr>
<article>
    <h1>test4.jsp</h1>
</article>
<hr>
<footer>
    <%-- test4_bottom.jsp 페이지를 현재 위치에 포함(include) 시키기 --%>
    <%@ include file="test4_bottom.jsp" %>
</footer>

💻