You should use
<jsp:include page="..." />
This will evaluate JSP EL in "..."
.
Some more info here Include another JSP file
質問
This line:
/${initParam['webinf']}${initParam['test']}header.jsp
Prints out:
/WEB-INF/test/header.jsp
and if I copy this into:
<%@ include file="/WEB-INF/test/header.jsp" %>
it works perfectly.
However, if I use the first line of code directly in the statement like this:
<%@ include file="/${initParam['webinf']}${initParam['test']}header.jsp" %>
I get the error:
Sun Feb 16 15:03:56 GMT 2014: org.apache.jasper.JasperException: /WEB-INF/test/index.jsp (line: 10, column: 9) File "/${initParam['webinf']}${initParam['test']}header.jsp" not found
解決
You should use
<jsp:include page="..." />
This will evaluate JSP EL in "..."
.
Some more info here Include another JSP file