I have a jsp file, like template of a page with header, footer, but without body, so in other jsp file i want to use this template and insert html body into it. So i need to create a lot of pages using this template.
Asked
Active
Viewed 187 times
0
-
Does this answer your question? [JSP tricks to make templating easier?](https://stackoverflow.com/questions/1296235/jsp-tricks-to-make-templating-easier) – Dave Newton Aug 28 '21 at 11:57
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 02 '21 at 20:47
1 Answers
0
If your question is re-using the jsp pages across multiple other pages in application then,
Considering static header and footer pages, you can use below code to re-use the header and footer template JSP pages in your multiple pages.
See NewPage.jsp sample code below
<%@ include file="Header.jsp" %>
<%-- Your html body will come here --%>
<%@ include file="Footer.jsp" %>
If it does not answer your question then please give more details about your question.

kody-technolab
- 69
- 4