JSP Directives Include
Include Directive -
Include directives is used for include any static JSP or HTML file in the JSP page.
Syntax of Include Directives :-
<%@ include file=”relative Path” %>
Example:-
First.jsp
<HTML>
<HEAD><title>Example Include Directive</title>
</HEAD>
<BODY>
<%@ include file="/second.jsp" %>
</BODY>
</HTML>
second.jsp
<h1>Include me</h1>
More about :-
Include directive works at compilation time of JSP. It statically include JSP or HTML file. Mean content of included file written in the main servlet.
The included file might be open and available to all requests, or it might have security restrictions. The JSP page might be recompiled if the included file changes.
Include directives is used for include any static JSP or HTML file in the JSP page.
Syntax of Include Directives :-
<%@ include file=”relative Path” %>
Example:-
First.jsp
<HTML>
<HEAD><title>Example Include Directive</title>
</HEAD>
<BODY>
<%@ include file="/second.jsp" %>
</BODY>
</HTML>
second.jsp
<h1>Include me</h1>
More about :-
Include directive works at compilation time of JSP. It statically include JSP or HTML file. Mean content of included file written in the main servlet.
The included file might be open and available to all requests, or it might have security restrictions. The JSP page might be recompiled if the included file changes.
Comments
Post a Comment