Skip to end of metadata
Go to start of metadata

How fast is SiteMesh?

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.

Can I change rendering order on the fly like a portal with Sitemesh?

Yes. The decorator isn't hardcoded; it can choose what panels to include, and in what order, at runtime.

What languages can panels be made from?

Any active content your appllication server can create: CGI, PHP, JSPs, servlets, velocity pages, freemarker tages, Tea, etc.

What is the advantage of using SiteMesh over Struts Tiles?

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 can do.

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.

Where can I find more information on Java Servlet 2.3 Filters?

A JavaWorld article on filters by Jason Hunter
IBM's developerWorks has an article on Tomcat Filters
A step by step tutorial here by the OrionServer guys.
A JavaWorld article on filters by Jason Hunter

IBM's developerWorks has an article on Tomcat Filters

I need this functionality, but I want an offline version!

See StaticMesh.

What ports are available?

Microsoft .NET (stable) and ISAPI C++ (unstable):, see the wiki for more information.


Does SiteMesh support HTML frames?

If the FrameSetDecoratorMapper sits in the decorator chain (sitemesh.xml) the frame definition page and the frame pages are not decorated.

How do you get a reference to the (parent) request from inside an inline decorator?

You can use Page.getRequest() to access the HttpServletRequest of the original page.

For example:

Is there a way for a decorator to pull a property (<page:param> value) via Java code, not just via the taglib?

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):

Example 3 (Velocity):

How come I cannot decorate my error pages on Orion?

Orion applies filters incorrectly to error pages. For more information, consult the mail archives.

How do I enable SiteMesh to decorate error pages on Tomcat 5?

Replace the <filter-mapping> element in web.xml with this:

  • No labels