Skip to end of metadata
Go to start of metadata


Out of the box SiteMesh supports advanced functions that go beyond URL pattern decoration.

This tutorial shows how to have a page selectively choose a decorator.


Besides decorating by URL pattern, SiteMesh has additional functions defined within the sitemesh jar sitemesh-default.xml which loads the following mappers,

  • PageDecoratorMapper
  • FrameSetDecoratorMapper
  • PrintableDecoratorMapper
  • FileDecoratorMapper
  • ConfigDecoratorMapper

This tutorial will examine, PageDecoratorMapper allows pages to specify the decorator to use and PrintableDecoratorMapper (...) would be the next most useful.

Using Meta Tag to Specify Decorators with PageDecoratorMapper

In some cases it is useful to have a specific page use a different decorator.

Add the following to the head of your HTML document where decoratorName is the name of your target decorator.

Following our tutorial...