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>
Example
<-jsp:include page="scripts/login.jsp" />
<-jsp:include page="copyright.html" />
<-jsp:include page="/index.html" />
<-jsp:include page="scripts/login.jsp">
<-/jsp:include>
Description
The
You cannot always determine from a pathname if a file is static or dynamic. For example, http://server:8080/index.html might map to a dynamic servlet through a Web server alias. The
If the included file is dynamic, you can use a
Attibutes
# page="{relativeURL | <%= expression %>}"
The relative URL that locates the file to be included, or an expression that evaluates to a String equivalent to the relative URL.
The relative URL looks like a pathname-it cannot contain a protocol name, port number, or domain name. The URL can be absolute or relative to the current JSP file. If it is absolute (beginning with a /), the pathname is resolved by your Web or application server.
# flush="true"
You must include flush="true", as it is not a default value. You cannot use a value of false. Use the flush attribute exactly as it is given here.
# <-jsp:param name="parameterName" value="{parameterValue | <%= expression %> }" />+
The
You can use more than one
No comments:
Post a Comment