Fast enough! SiteMesh typically has a 10-20 ms processing time, centering well around 10ms. You're more likely to have process timing issues in the pages being decorated.
Yes. The decorator isn't hardcoded; it can choose what panels to include, and in what order, at runtime.
Any active content your appllication server can create: CGI, PHP, JSPs, servlets, velocity pages, freemarker tages, Tea, etc.
Tiles seems to just replicate the <page:applyDecorator> tag (albeit without the advanced page parsing of SiteMesh). However this is a very small part of what SiteMesh.
The strongest attribute of SiteMesh is that the decorators are applied with a filter - therefore you can decorate pages without the pages themselves knowing they are being decorated (so you can apply a single SiteMesh decorator to a site that uses PHP, JSP and ASP if you want).
Also using DecoratorMappers you can map which decorator/s are used in a number of different ways (ie have one decorator for printable pages, another for robots and another for Netscape users - all without changing the underlying page).
That said, you can also alter which decorator is applied from the underlying page (note, the decorated page doesn't need to know it's being decorated - however if it does know it can pass parameters and choose decorators in SiteMesh - powerful).
Also SiteMesh has a full property system (ie decoratedPage.getTitle() or decoratedPage.getProperty(meta.description)) which allows you to build very advanced and flexible decorators.
More info available here.
See StaticMesh.
If the FrameSetDecoratorMapper sits in the decorator chain (sitemesh.xml) the frame definition page and the frame pages are not decorated.
You can use Page.getRequest() to access the HttpServletRequest of the original page.
For example:
<decorator:usePage id="p" />
Path Info = <%= p.getRequest().getPathInfo() %>
You can access the Page.getProperty() method. A Page can be accessed either via a JSP tag, or through an attribute in the request.
Example 1 (using JSP tag):Example 2 (pure Java):
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<decorator:usePage id="thePage" />
<% String author = thePage.getProperty("meta.author"); %>
Example 3 (Velocity):
import com.opensymphony.module.sitemesh.Page;
import com.opensymphony.module.sitemesh.RequestConstants;
...
Page thePage = request.getAttribute(RequestConstants.PAGE);
String author = thePage.getProperty("meta.author");
$page.getProperty("meta.author")
Orion applies filters incorrectly to error pages. For more information, consult the mail archives.
Replace the <filter-mapping>
element in web.xml
with this:
sitemesh /* FORWARD REQUEST