You have several options. The first is <jsp:include> . The second is <c:import> . The c: tags are JSTL, the JavaServer Pages Standard Tag Library .
What's the difference? First of all, <jsp:include> inserts the contents of another JSP page within the same JAR relative to the current page, while <c:import> can read the absolute or relative URL and display this content on the page, retrieve the Reader or save the contents in variable.
The syntax for both XML-like is:
<jsp:include page="header.jsp"/>
or
<jsp:include page="header.jsp"></jsp:include>
Note. both can take parameters.
cletus
source share