STUDY/TIL
JSP include 방식 차이점
개미606
2020. 7. 28. 16:09
1. static(directive) include (정적인 방식)
동적인 방식보다 빠름
파라미터를 주고 받을 수 없음
해당 jsp페이지가 컴파일 될 때 참조하는 파일도 함께 컴파일 됨 => 두 파일의 코드가 합쳐진 상태로 컴파일
<%@ include file="파일경로/파일명"%>
2. dynamic include (동적인 방식)
동적인 방식보다 느림
파라미터 주고 받기 가능
request될 때, 포함할 jsp페이지를 다시 request하는 과정을 거침
1) 액션태그 사용
<jsp:include page="파일경로/파일명" />
2) 코어태그 사용
<c:import url="파일경로/파일명" />
+)참고
Top 50 JSP Interview Questions and Answers You Must Know In 2019
This article is a comprehensive guide on the top 50 Java Servlet Page interview questions asked in your interviews.
medium.com