How should I include an HTML file into another HTML file, using JSP?
<jsp:include page="/include.html"></jsp:include>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have a couple of options. The first is
<jsp:include>. The second is<c:import>. Thec:tags are JSTL, the JavaServer Pages Standard Tag Library.What’s the difference? Primarily
<jsp:include>inserts the contents of another JSP page within the same JAR relative to the current page whereas<c:import>can read in an absolute or relative URL and display those contents on the page, retrieve aReaderor store the contents in a variable.The syntax for both is XML-like so:
or
Note: both can take parameters.