Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java I JSP include

Related Tutorials


 
 

Share on Google+Share on Google+

JSP include

Advertisement
A JSP page can include page fragments from other files to form the complete response.

JSP include

     

A JSP page can include page fragments from other files to form the complete response. There are two include mechanisms: the include directive and the include action

include directive

The include directive reports to the JSP compiler for including a complete file into the current file.  For example the directive: 

<%@ include file="filename.jsp" %> 

 includes the content of the specified file during the translation phase when the page is converted to a servlet. In this phase, the actual main page and the included file are simply merged. 

include action

The include action allows you to insert files into the page being generated. For example the action:

  <jsp:include page=" relative URL" flush="true" /> 

 includes the response generated by executing the specified page (a JSP page or a servlet) during the request processing phase when the page is requested by a user. That means, unlike the include directive, which inserts the file at the time the JSP page is translated into a servlet, this action inserts the file at the time the page is requested.

Read more at:

http:/www.roseindia.net/jsp/IncludeDir_Example.shtml

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 11, 2009

Related Tutorials

Discuss: JSP include  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com