Newbie,
I am trying to pass over the name of a file in a string variable called
template to @ include file
It will only work if i hard code the file name eg <%@ include
file="templates/sport.jsp" %>
I need <%@ include file= %> to reference a string, as the filename will
change depending on what template is being used.
Below is the code i am trying to get working.
<HTML>
<BODY>
<% String template = "templates/sport.jsp"; %>
<%@ include file=template %>
</BODY>
</HTML>
Thanks.
Paul Hamaker - 04 Mar 2006 11:03 GMT
<jsp:include page="<%=somefile%>" /> is a solution for including files
that change frequently.
--------------------
Paul Hamaker, SEMM, teaching ICT since 1987
http://javalessons.com