I am a newbie for JAVA and jsp.
I have a fix code for header and for footer which I want to use for all my pages. I don't want to duplicate it. In PHP, we can do this by creating a file header.php and footer.php and including these files whenever required.
I am wondering how I can do the same with jsp? I want to create header and footer and include them in the pages. I don't want to create a template though. Not all pages use same header and footer. So, I must have a flexibility to choose where I could include these 2 files or not.
you can achieve the same in jsp by using <jsp:include> tag or <%@include --->
save the header part in header.jsp and footer part in footer.jsp
do the following