Include Directive in JSP, What is the use of include directive in JSP, How to include a file into a JSP page


Include Directive in JSP, What is the use of include directive in JSP, How to include a file into a JSP page

The include directive is used to include an external page or file of any type like any HTML page, any JSP page, any image file, any text file, xml file etc into the JSP page, The include directive include the page or file into the translation time of a JSP page. you can write the include directive code anywhere into the page wherever you want.

Syntax of the include directive

<%@include file="filename"%>

Example:-

<%@include file="header.html"%>
<html>
<head><title>Welcome Page</title></head>
<body>
</body>
</html>
<%@include file="footer.html"%>

Thanks for visiting

{ 0 comments... read them below or add one }

Post a Comment