JSP Include Directive

Facebooktwitterredditpinterestlinkedinmailby feather

As the name implies, include directive is used to include the content of other files such as HTML, JSP, text into the current JSP page. These files are included during translation phase.

Syntax of include directive

<@ include file=”file-name”>

Include directive tag can be placed anywhere in JSP page.

Example of Include Directive

This example expresses the simple way to include more than one file of different types within JSP page through include directive.

header.html

footer.jsp

index.jsp

Output:

Facebooktwitterredditpinterestlinkedinmailby feather

Leave a Comment