Designing and Implementing Composite Applications 10.4 | Designing and Implementing Composite Applications | Getting Started with the webMethods Application Platform API | webMethods Tag Library for JSP | <jsp:include>
 
<jsp:include>
You use the <jsp:include> tag to insert a text file in the JSP. At runtime, the Tomcat servlet container inserts the contents of the specified file in the JSP and processes any tags the file contains.
Tip: If you use JSPs extensively, you might want to build a library of standard “code fragments” that you reference using <jsp:include> tags.
Syntax
For interpreted pages:
<jsp:include page="file" flush="true"/>
For static pages:
<%@ include file="file"%>
Arguments
Argument
Description
file.extension
Text file to insert. If the text file is not in the same directory as the JSP that references it, specify the path to the file relative to the JSP.
Examples
These examples insert the TMPL_ShipToBlock.html file into the JSP.
*The TMPL_ShipToBlock.html file resides in the same directory as the JSP.
<webm:scope recordName="buyerInfo">
<p>Shipped To:<br>
<jsp:include page="TMPL_ShipToBlock.html" flush="true"/>
</p>
</webm:scope>
*The TMPL_ShipToBlock.html file resides in a subdirectory named StandardJSPs within the directory in which the JSP resides.
<webm:scope recordName="buyerInfo">
<p>Shipped To:<br>
<jsp:include page="StandardJSPs/TMPL_ShipToBlock.html" flush="true"/>
</p>
</webm:scope>
*The TMPL_ShipToBlock.html file resides in the JSP’s parent directory.
<webm:scope recordName="buyerInfo">
<p>Shipped To:<br>
<jsp:include page="../TMPL_ShipToBlock.html" flush="true"/>
</p>
</webm:scope>

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release