I have used struts tags in my decorating templates (past tense). It is definitely possible... but not smart, IMHO. Why? Response times, especially under load + time, were horrible.
I countered this by removing the struts tags from my templates, re-arranging the filters in web.xml, and configuring SiteMesh to use different decorator templates for different paths. (Note that this works when template content varies based on navigation path, not on user attributes or something similar.) Response times were much snappier after doing this. > -----Original Message----- > From: Philipp Leusmann [mailto:philipp.leusm...@rwth-aachen.de] > Sent: Thursday, January 21, 2010 12:26 PM > To: Struts Users Mailing List > Subject: Re: decorating static content with sitemesh > > Ok, that would not be sufficient for me, since I use some > struts in my decorating template, as well. > > I thought, maybe struts and sitemesh could decorate static > pages using the default action to resolve the stack > > Philipp > > Am 21.01.2010 um 18:01 schrieb Kawczynski, David: > > > Plain sitemesh, with it's own filter in web.xml > > > >> -----Original Message----- > >> From: Philipp Leusmann [mailto:philipp.leusm...@rwth-aachen.de] > >> Sent: Thursday, January 21, 2010 11:58 AM > >> To: Struts Users Mailing List > >> Subject: Re: decorating static content with sitemesh > >> > >> David, > >> > >> did you use plain sitemesh or the struts-sitemesh plugin? > >> > >> Philipp > >> > >> Am 21.01.2010 um 17:50 schrieb Kawczynski, David: > >> > >>> I have used SiteMesh to decorate static content served > >>> up by the app server. If the static content is served > >>> up by apache (or some other httpd server) you're out of > >>> luck. > >>> > >>>> -----Original Message----- > >>>> From: Philipp Leusmann [mailto:philipp.leusm...@rwth-aachen.de] > >>>> Sent: Thursday, January 21, 2010 11:39 AM > >>>> To: Struts Users Mailing List > >>>> Subject: decorating static content with sitemesh > >>>> > >>>> Hi, > >>>> > >>>> I am using the sitemesh-plugin to decorate my struts-site and > >>>> Im am wondering, if it is possible to decorate static-pages > >>>> using sitemesh. > >>>> That is, I have some plain html pages which need to get the > >>>> same LAF the entire site has. > >>>> I already added "<pattern>/html/*</pattern>" to the > >>>> decorators.xml, but all I get is an Exception when trying to > >>>> open the page: > >>>> > >>>> java.lang.RuntimeException: javax.servlet.ServletException: > >>>> Error applying decorator: null > >>>> > >>>> com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator > >>>> .render(BaseWebAppDecorator.java:39) > >>>> > >>>> com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteM > >>>> eshFilter.java:84) > >>>> > >>>> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.do > >>>> Filter(StrutsPrepareFilter.java:82) > >>>> > >>>> > >>>> The Exception is raised by a NullPointerException in > >>>> org.apache.struts2.sitemesh.OldDecorator2NewStrutsDecorator.re > >>>> nder(Content, HttpServletRequest, HttpServletResponse, > >>>> ServletContext, SiteMeshWebAppContext) by > >>>> ValueStack vs = > >>>> Dispatcher.getInstance().getContainer().getInstance(ValueStack > >>>> Factory.class).createValueStack(); > >>>> > >>>> "Dispatcher.getInstance()" returns null > >>>> > >>>> FYI, I am using the sitemesh-2.4.2 hotfix from jira > >>>> > >>>> Now, is this behaviour only a bug, or is it not meant to be > >>>> used with static content? > >>>> > >>>> To find out by myself, I was desperately trying to compile > >>>> struts2 and xwork from svn, but it continously failed and I > >>>> gave up. (Maybe this is why the last nightly build is from 6 > >>>> days ago?) > >>>> > >>>> Hope somebody can help. > >>>> > >>>> Regards, > >>>> Philipp > >>>> > >>>> > >> > --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >>>> For additional commands, e-mail: user-h...@struts.apache.org > >>>> > >>>> > >>> Notice: This e-mail message, together with any > >> attachments, contains information of Merck & Co., Inc. (One > >> Merck Drive, Whitehouse Station, New Jersey, USA 08889), > >> and/or its affiliates Direct contact information for > >> affiliates is available at > >> http://www.merck.com/contact/contacts.html) that may be > >> confidential, proprietary copyrighted and/or legally > >> privileged. It is intended solely for the use of the > >> individual or entity named on this message. If you are not > >> the intended recipient, and have received this message in > >> error, please notify us immediately by reply e-mail and then > >> delete it from your system. > >>> > >>> > >>> > >> > --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >>> For additional commands, e-mail: user-h...@struts.apache.org > >>> > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > Notice: This e-mail message, together with any > attachments, contains information of Merck & Co., Inc. (One > Merck Drive, Whitehouse Station, New Jersey, USA 08889), > and/or its affiliates Direct contact information for > affiliates is available at > http://www.merck.com/contact/contacts.html) that may be > confidential, proprietary copyrighted and/or legally > privileged. It is intended solely for the use of the > individual or entity named on this message. If you are not > the intended recipient, and have received this message in > error, please notify us immediately by reply e-mail and then > delete it from your system. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org