JSP 파일의 재사용
1) The include directive :
<%@ include file="header.html" %>
Static : adds the content from the value of the file attribute to the current page at translation time. The directive was originally intended for static layout templates, like HTML headers.
=> 정적 : 현재 페이지의 변환시간(translation time)에 파일 속성의 값(header.html)으로부터 컨텐츠를 추가한다. 이 지시어는 본래 정적 HTML 해더와 같이 정적인 템플릿을 위한 것이다.
2) The <jsp:include> standard action :
<jsp:include page="header.jsp"/>
Dynamic : adds the content from the value of the page attribute to the current page at request time. Was intended more for dynamic content coming from JSP's.
=> 동적 : 현재 페이지의 요청시간(request time)에 파일 속성의 값(header.jsp)으로부터 컨텐츠를 추가한다. JSP의 동적인 컨텐츠를 위한 것이다.
3) The <c:import> JSTL tag :
<c:import url="http://www.example.com/ex.html" />
Dynamic : add the content from the value of the URL attribute to the current Page, at request time. It works a lot like <jsp:include>, but it's more powerful and flexible : unlike the otherr two includes, the <c:import> url can be from outside the web Container!
4) Preludes and codas :
Static : preludes and codas can be applied only to the beginnings and ends of pages. You can implicitly include preludes (also called headers) and codas (also called footers) for a group of JSP pages by adding <include-prelude> and <include-coda> elements respectively within a <jsp-property-group> element in the Web application web.xml deployment descriptor.