Hello Devs,


In this tutorial, we are going to learn about JSP Include Directive. 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.


Syntax:

<%@ Include file="filename"; %>


JSP Include Directive Example

footer.html

<p>Copyright © 2017 rathorji.in</p>

Example

<!DOCTYPE html>
<html>
<head>
<title>JSP include</title>
</head>
<body>
<% out.print("Welcome to JSP Tutorial"); %>
<%@ Include file="footer.html"; %> </body>
</html>


Output

Welcome to JSP Tutorial

Copyright © 2017 rathorji.in