Include functions
A strong feature of JSP is the posibility to include other jsp pages static, dynamically and with passing parameters.
A great example of making use of the include feature is when making a menu for your webapplication.
A static method of including your menu is:
<jsp:include page="menu.jsp" flush="true" />
Making the function more dynamic by passing static parameters:
<jsp:include page="menu.jsp" flush="true">
<jsp:param name="pageId" value="1" />
<jsp:param name="otherValue" value="myValue" />
</jsp:include>
You probably figured it out by now, but yes it's easy to pass variables:
<jsp:include page="menu.jsp" flush="true">
<jsp:param name="pageId" value="<%=pageId%>" />
<jsp:param name="otherValue" value="<%=myValue%>" />
</jsp:include>