Jsp Include Directive

Include directive is a type of directive tag. If a programmer wants to include contents of a file inside another, then the Include directive is used. The file included c an be either static ( HTML file) or dynamic (i.e., another tag file). The include directive is used to include the contents of other file in the current tag file.

Syntax of Include directive is:

<%@ include file = "xxx.html/xx.tagf"%>

Example of include directive


<%@ include file="header.html" %>

Today is: <%= java.util.Calendar.getInstance().getTime() %>


Note: The include directive includes the original content, so the actual page size grows at runtime.