You shouldn't have .jsp files in any subdirectory of WEB-INF
, and if webapp
is the context root of your web application, there's no way you can include anything outside it, since both the include directive and standard tag only work on files under the context root.
If you were to move the whole resources
directory under webapp
, then you'll be able to use one of the following:
<%@include file="/resources/static/template/index.html"%>
Or
<jsp:include page="/resources/static/template/index.html"/>
I have solved it like this
尝试使用:
<%@include file="../../resources/static/template/index.html" %>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.