Some classes to assist integrate Sitemesh into a Spring application context. This includes a new SiteMesh Factory, a Spring-compatible decorator and decorator factory, and a supporting property editor.
The attached file contains web.xml and applicationContext.xml fragments required to use the classes.
To explain our motivation for the classes, our application needs to support different decorator configurations for different clients. As we're already using Spring to store client-specific configuration, having SiteMesh obtain its decorators (and broader configuration) from Spring makes sense. This allows us to use the existing Spring configuration mechanisms such as PropertyPlaceholderConfigurer, custom database-backed application contexts etc.
We're also using WebDAV and would like decorators to be able to detect whether a certain file is available via WebDAV. For example, the AgentDecoratorMapper would need to see if a WebDAV-backed file is available. As our WebDAV environment is also housed in Spring, the attached classes enable these collaborator beans to be used directly.
Hope this is of use to everyone.
Ben Alex
Acegi Technology
IF THE ATTACHMENT APPEARS TO BE CORRUPT: It is a browser issue, so try using a different browser. Mozilla Firefox and wget both work fine.
Ben,
I use SiteMesh on a couple of Spring based projects. One of the advantages is that requests not handled by the Spring dispatcher such as static content can still be decorated the same way. Without having looked through your code (I will toinight!) how would you handle this? I'm assuming you wouldn't and would stick with standard SiteMesh configuration...?
Interesting stuff by the sounds of it anyway.
Darren Davison
(Spring team)