Actually, I just checked some of our code and this:
<jsp:include page="<%=(String)request.getAttribute("main")%>"></
jsp:include>
works...
I think the problem is that you are do mix a string and a runtime
expression in a tag. These are not html tags - the variables are
passed to a function - it's all or nothing.
Try:
<% String path = "directory/"+fileName; %>
<jsp:include page="<%=path%>" flush="true"/>
On May 1, 2008, at 11:10 PM, Hassan Schroeder wrote:
On Thu, May 1, 2008 at 12:35 PM, Jonathan Mast
<[EMAIL PROTECTED]> wrote:
Dynamically include a file where the file name is dynamic. Neither
of the
following lines of code work:
<jsp:include page="directory/<%=fileName%>" flush="true"/>
with JSTL: <jsp:include page="${fileName}" />
(assuming that fileName is in a JSTL scope, of course)
HTH
---
Hassan Schroeder ------------------------ [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]