![]() |
VOOZH | about |
The Include Action Tag in JSP is used to include the content of one JSP page into another at request time. It helps in reusing common components like headers and footers, making web applications more modular and maintainable. This inclusion happens dynamically when the page is requested.
Syntax:
<jsp:include page="file.jsp" />
A simple JSP application that will demonstrate the Include Action Tag of JSP.
This is the main page where we include header and footer using <jsp:include>.
index.jsp:
This file contains reusable header content.
header.jsp:
This file contains reusable footer content.
footer.jsp:
Url: http://localhost:8080/YourProject/