Pergunta

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

Foi útil?

Solução

You should use

  <jsp:include page="..." /> 

This will evaluate JSP EL in "...".

Some more info here Include another JSP file

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top