Contains a static or dynamic file.
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>
Example
<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 allow you to include dynamic files and static files. The results of these two types of files are different. If the file is only a static file, this inclusion only adds the content of the contained file to the JSP file. If the file is dynamic, the included file will be executed by the JSP compiler (similar to ASP)
You cannot determine whether a file is dynamic or static from the file name, suchAspcn. asp
It may only contain some information and does not need to be executed. <JSP: Include> these two types of files can be processed at the same time. Therefore, you do not need to determine whether the file is dynamic or static.
If the file is dynamic, you can also use <JSP: param> to pass the parameter name and parameter value.
Attribute
- Page = "{Relativeurl| <% =Expression%> }"
The parameter is a relative path or an expression that represents a relative path.
- Flush = "true"
Here you must use flush = "true". You cannot use false. The default value is false.
- <JSP: Param name ="Parametername"Value = "{Parametervalue| <% =Expression% >}"/> +
<JSP: param> the clause allows you to pass one or more parameters to a dynamic file.
You can use multiple <JSP: param> in a single page to pass multiple parameters.