In this Section, we will discuss about "include" directive of JSP with an example.
The include directive :
?Specifies the names of the files to be inserted during the compilation of the JSP page and executes later.
? Creates the contents of the included files as part of the JSP page.
? Inserts a part of the code that is common to multiple pages.
? The syntax of the include directive is :
|<%@ include file = ?URLname? %>|
The "URLname" is the relative URL of the file from the root directory of your JSP application.Contents of the include file is added to the calling JSP page if the resource is static otherwise the included file acts on the request object and result after execution of the included dynamic file on the server.
<head><title>Include Directive JSP Page.</title></head>
<font size="5"><%="Example of include JSP directive" %></font><br/>
Posted on: June 15, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles