How to apply decorator dynamically from Java?

Peter <[email protected]> Wed, 24 Aug 2005 21:55:50 CDT
Newsgroups gmane.comp.web.sitemesh.general,gmane.comp.lang.pnuts.user
Message-ID <15505515.1124938670932.JavaMail.os-j2ee@opensymphony01.contegix.com>
Hello gurus,

I have a Struts web application using Sitemesh.  I want to dynamically change the decorator applied to a jsp from Java.

I'm able to do this when I do this on Java:
req.setAttribute(RequestConstants.DECORATOR, "myDecoratorName");

But the problem is that this doesn't work if the pattern to get to the Java action is in the <excludes>...</excludes> section in decorators.xml.  So if like I have the following:
    <excludes>
      <pattern>*.do</pattern>
    </excludes>
then on the Java action I cannot just use the above code -- I also need to tell SiteMesh to actually apply some decorator on this request.

How can I do this?

Thanks,
Peter

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


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