Written by
java-style
on
on
Day04(<%@ include %>)
Day04(<%@ include %>)
04include.jsp의 코드내용
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> Insert title here 04include include 전 <%@include file="04included.jsp" %> include 후 <%=includedA %>
04included.jsp의 코드내용
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> Insert title here 나는 included된 jsp페이지 <% int includedA = 50; %>
출력내용
04include.jsp의 출력이미지
<%@include%>는????
설명
서버측 include 라고 생각하면 된다 즉 소스 실행전에 include가 된다고 보자
소스 실행전 포함됨으로 변수를 같이 사용할 수 있다
동적으로 페이지 할당을 할 수가 없다. 즉 정적인 페이지에 활용된다는 것 !
속성
file : 포함될 페이지를 명시한다
jsp:include VS include file 차이를 잘 생각할 것 ! 활용하는 곳이 다를테니 !
from http://fun-developer.tistory.com/41 by ccl(A) rewrite - 2021-10-07 19:01:52