문제

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top