Include action tag
The include action
tag allows a static or dynamic resource such as HTML or JSP pages, specified by
a URL, to be included in the current JSP while processing a request.
General syntax of include action Tag:
<jsp:include page=”{relativeURL
|<%=expression%>}”>
Include action in JSP
is used to include resource in JSP file these resource can be either static or
dynamic.
• Elements of this
action is processed at the time of the JSP page execution.
• Here in case of the
static resource contents are inserted into the calling JSP file and in case of
dynamic resource first the included resource receives the request and executed
and produces the result and then this result is included in the calling JSP
file.
Use the following syntax for a dynamic
resource:
<jsp:include page=”{relativeURL
|<%=expression%>}”>
<jsp:param name=”parameterName” value=” {parameterValue
|<%=expression%>}”/>
·
With jsp:param , We can pass the name and value of a parameter
to the dynamic file.
·
The relative URL is placed within " " denotes the
location of the file to be included or denotes the pathname to be included.
·
This can also be an
expression which is taken automatically as string, denoting the relative URL.
include
action tag example:
Comments
Post a Comment