The JSP include directive is used to takes all the JSP file, HTML file or text file that exits on the specified file and copies into the file that include statement.
Include directive is very useful when we want to include the same JSP, HTML or text file on multiple pages of a web application.
Assume we have a standard footer file called "footer.html", that looks like this:
To include it in a JSP file use include statement
<!DOCTYPE html>
<html>
<head>
<title>JSP include</title>
</head>
<body>
<% out.print("Welcome to JSP Tutorial"); %>
<%@ Include file="footer.html"; %>
</body>
</html>
Welcome to JSP Tutorial
Copyright © 2017 www.studentstutorial.com