JSP include

Ads
 

JSP include

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

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

Ads

Ads