SiteMesh

From Wikipedia, the free encyclopedia

SiteMesh is "a Java web-application development framework" developed by OpenSymphony.

According to OpenSymphony, SiteMesh

  • is a web-page layout and decoration framework and web-application integration framework to aid in creating large sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required.
  • intercepts requests to any static or dynamically generated HTML page requested through the web-server, parses the page, obtains properties and data from the content and generates an appropriate final page with modifications to the original. This is based upon the well-known Decorator design pattern.
  • can also include entire HTML pages as a Panel within another page. This is similar to Server Side Includes, except that the HTML document will be modified to create a visual window (using the document's Meta-data as an aid) within a page. Using this feature, Portal type web sites can be built very quickly and effectively. This is based upon the well-known Composite design pattern.
  • is built using Java 2 with Servlet, JSP and XML technologies. This makes it ideal for use with Java EE applications, however it can be integrated with server-side web architectures that are not Java based such as CGI (Perl/Python/C/C++/etc), PHP, ColdFusion, etc...
  • is very extensible and is designed in a way in which it is easy to extend for custom needs.

Contents

[edit] License

SiteMesh uses the OpenSymphony Software License which is a modified (and fully compatible with) Apache Software License.

[edit] How it works

SiteMesh uses a Servlet Filter that intercepts the HTML being returned to the web browser, extracting the relevant content and merging it into a template known as the decorator.

[edit] History

SiteMesh was originally developed in 1999 by Joe Walnes. At the time it used Servlet Chains, a feature not part of the standard Servlet specification but supported by some Servlet containers such as Orion Application Server.

In 2000, the first public review of version 2.3 of the Servlet Specification was released, which contained the addition of Servlet Filters. These provided a standardized alternatives to Servlet Chains and SiteMesh was adapted to make use of these instead.

Shortly after this, the decision was made to release SiteMesh as open source software. Joe Walnes and Mike Cannon-Brookes formed the OpenSymphony project to provide a source of Java EE components - the first two consisting of SiteMesh and OSCache.

At this time, SiteMesh had a very small set of users, many of whom got involved in the development of the project. Not long after SiteMesh was originally open sourced, Victor Salaman rewrote the internal HTML parser to produce a 1200% performance increase.

[edit] External links