JSP syntax (11) include
<jsp:include>
Includes a static or dynamic document.
JSP syntax
<Jsp: include page = "(relativeURL | <= expression%%>)" flush = "true" />
Or
<Jsp: include page = "(relativeURL | <= expression%%>)" flush = "true">
<Jsp: param name = "parameterName" value = "(parameterValue | <= expression%%>)" /> +
</ Jsp: include>
Examples
<jsp:include Page="scripts/login.jsp" />
<jsp:include Page="copyright.html" />
<jsp:include Page="/index.html" />
<jsp:include Page="scripts/login.jsp">
<jsp:param Name="username" value="jsmith" />
</ Jsp: include>
Description
<jsp:include> Elements allows you to include dynamic and static document, the two documents contain the results are different. If the document is a static document, this is only to contain the contents of the documents contained in the document to add jsp, and if the dynamics of this document, then that document will be included by Jsp compiler implementation (and all similar asp )
You can not judge from the file name on a document is dynamic or static, for example, there may only be aspcn.asp some of the information it contains, without the need for implementation. <jsp:include> To deal with the two documents at the same time, so you do not need to include when judging this document is dynamic or static.
If this is a dynamic document contains, then you can also use <jsp: param> also passing a parameter name and parameter value.
Attribute
Page = "(relativeURL | <= expression%%>)"
Parameters for a relative path, or on behalf of a relative path expressions.
Flush = "true"
Here you must use flush = "true", you can not use false value. Default values for the false
<Jsp: param name = "parameterName" value = "(parameterValue | <= expression%%>)" /> +
<jsp:param> Clauses allow you to transfer one or more parameters to dynamic document
You can use more than one page <jsp: param> Transfer to a number of parameters,
Tags: java include, JSP






