Paul Paul - 1 year ago 83
Java Question

Is it possible to have a dynamic path as part of a jsp include

I have a include file in my jsp

<%@ include file = "includes/testinclude1.jsp" %>

Test Include1 contains struts tags, and therefore needs to be pulled in and compiled. Which works ok. Is there a way to make the path for this file be dynamic in any way or am I looking at a rethink in terms of design?

Answer Source

You can the <jsp:include page="..."> tag instead of the static <%@ include %> which only works for static references.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download