I would like to include a file depending on a request attribute value.
${theme} -> themeA
To sum up. I would like something like this:
<%@ include file='../themes/${theme}/jsp/content/welcome.jsp'%>
Any easy workaround?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not with <%@ include%> as that is a static/compile time include. You could instead use <jsp:include> tag, which is evaluated at runtime, and includes the result of executing that page, rather than including the page itself at compile time.
To compare all the differences between the include directive and <jsp:include> check out JSP2.0 Reference
The <c:import> tag would also work if you are using JSTL.