Dynamic Include In Decorator

Phillip Hershkowitz <[email protected]> Wed, 20 Apr 2005 19:54:02 CDT
Newsgroups gmane.comp.web.sitemesh.general
Message-ID <30289543.1114045205682.JavaMail.os-j2ee@opensymphony01.contegix.com>
Hi,

I think this may be a jsp question as well as a sitemesh one.
I'm having trouble including dynamic output in my decorator.

In my target pages I've put:
<meta name="topnav" content="/inc/topnav_help.jsp"/>
in each file with a different values depending on the target page.

In the decorator I've put:
<decorator:usePage id="thePage" />
<%   String banner = thePage.getProperty("meta.topnav"); 
       pageContext.setAttribute("banner", banner);
%>

I can't seem to get this variable to be the target of an include 

This blows up: <%@ include file="<%= banner %>" />
with: File "/decorators/<%= banner %>" not found

This doesn't work to set the var banner:
<c:set var="banner" value="{thePage.getProperty('meta.topnav')}" scope="page"/>
This include also fails:
<jsp:include page="<%= thePage.getProperty("meta.topnav") %>"/>

 
Can I use getProperty values in an include?
Is there a better way to do this with sitemesh?

Thanks,
Phil Hershkowitz

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=1710&messageID=5270#5270


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]