Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The sitemesh-plugin.jar contains several classes and , a standard JAR manifest, and a plugin configuration file.

Code Block
 + META-INF/
   + manifest.mf
 + org
   + apache
     + struts2
       + sitemesh
         + FreeMarkerPageFilter.class
         + TemplatePageFilter.class
         + VelocityPageFilter.class
 + struts-plugin.xml

While the The SiteMesh Plugin doesn't need provide any configuration elementsnew results, like interceptors or results, and so it doesn't bother with a struts-plugin.xml., or actions, or even extend any Struts integration points, it does need to know what settings have been enabled in the Struts framework. Therefore, its struts-plugin.xml looks like this:

Wiki Markup
{snippet:id=all|lang=xml|url=struts2/plugins/sitemesh/src/main/resources/struts-plugin.xml}

The two bean elements, with the "static" flag enabled, tell Struts to inject the current settings and framework objects into static property setters on startup. This allows, for example, the FreeMarkerPageFilter class to get an instance of the Struts FreemarkerManager and the current encoding setting.

Tiles plugin

Tiles is a popular alternative to SiteMesh. Tiles provides a common look-and-feel to an application's pages by breaking the page down into common fragments or "tiles".

...

Since the Tiles Plugin does need to register configuration elements, a result class, it provides a
struts-plugin.xml file.

Bundled Plugins

...