The tale of a sitemesh experiment
using sitemesh in an OSGi environment
Two sitemesh resources
Paul Codding's blog entry: 'Spring, Hibernate, and Sitemesh'SiteMesh - Building SiteMesh Decorators
Weaving sitemesh into pebble
Add the sitemeshPageFilter into WEB-INF/web.xml:
<filter>Prepare the pebble
<filter-name>sitemesh</filter-name>
<filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
template.jsp is as easy as replacing the built-in template mechanism
<%-- the main area into which content gets rendered --%>with the sitemesh pendant:
<div id="content">
<template:content/>
</div>
And register the
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
...
<div class="docBody">
<decorator:body />
</div>
template.jsp as main decorator in WEB-INF/decorators.xml:
<decorators defaultdir="/themes/default">
<decorator name="main" page="template.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
The OSGi configuration in MANIFEST.MF
com.springsource.com.opensymphony.sitemesh;bundle-version="2.3.0"
