Passing Parameter with <jsp: include>
In this example we are going to use <jsp:include> action tag.
This action tag has one attribute page which is used to include a
file in a jsp page. While using <jsp:param> we are adding the file
at run time.
The code of the program is given below:
<title>This page passes parameters</title>
<!-- header from include-->
<jsp:param name="UserName" value="Roseindia.net"/>
Above text is from AccessincludedParameter.jsp.
<!-- the included file -->
<h1><%=request.getParameter("UserName") %> </h1>
Output of the Program: