JSP -- Reusing content in JSP page.
There are three ways to reuse the content in jsp pages:
1. include directive <%@ include file="filename" %>
This directive just inserts the static content or dynamic content into the including jsp file before the jsp file is compiled into servlet.
2. preludes and codas
3. jsp:include element, not a directive of jsp
The results of including static and dynamic resources are quite different. If the resource is static, its content is inserted into the calling JSP file. If the resource is dynamic, the request is sent to the included resource, the included page is executed, and then the result is included in the response from the calling JSP page. Like:
<jsp:include page="response.jsp"/>
Transfer control to another web component:
<jsp:forward page="filename.jsp"/>
<jsp:param name="xx" value="vvv"/>