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:

enter image description here

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

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -