java - JSP - Include a file from the resources folder -
how include file jsp file resources path? should path specifically. using either @include or jsp:include.
my directory structure:
i want include resources/static/template/index.html should include path in home.jsp.
you shouldn't have .jsp files in subdirectory of web-inf, , if webapp context root of web application, there's no way can include outside it, since both include directive , standard tag work on files under context root.
if move whole resources directory under webapp, you'll able use 1 of following:
<%@include file="/resources/static/template/index.html"%> or
<jsp:include page="/resources/static/template/index.html"/> 
Comments
Post a Comment