Questions tagged [sitemesh]

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 content, and generates appropriate final page with modifications to original—based on Decorator design pattern
  • Can also include entire HTML pages as a Panel within another page—similar to Server Side Includes, except HTML document modified to create a visual window (using document's Meta-data as 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.
  • Built on Java 2 with Servlet, JSP and XML technologies. This makes it good for use with Java EE applications, however it can be integrated with non-Java server-side web architectures, like CGI (Perl/Python/C/C++/etc), PHP, and ColdFusion.
  • Very extensible, designed for easy extension for custom needs

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.

Sources:

http://en.wikipedia.org/wiki/SiteMesh

http://www.opensymphony.com/sitemesh/

Documentation

240 questions
5
votes
1 answer

How can I catch a spring message JstTagException?

I'm using Spring MVC 3.0 with sitemesh and spring message bundles. For example, I have the following: If nav.item.name does not exist in my resource file, I receive a blank page and a JspTagException in the…
Dave
  • 55
  • 5
5
votes
2 answers

How to handle body onload event in tag

I am using sitemesh in our application. In decorator jsp I have added in head and on body tag: So I want to handle body onload on my jsp page. I have added following…
Raje
  • 3,285
  • 15
  • 50
  • 70
5
votes
1 answer

Using SiteMesh with RequestDispatcher's forward()

I'm attempting to integrate SiteMesh into a legacy application using Tomcat 5 as my a container. I have a main.jsp that I'm decorating with a simple decorator. In decorators.xml, I've just got one decorator defined:
Rob Hruska
  • 118,520
  • 32
  • 167
  • 192
5
votes
1 answer

What alternatives exist to Sitemesh to help layout JSP/JSTL page footers/headers in a Spring MVC app?

I've tried excluding certain pages from my Sitemesh decorator but it doesn't seem to follow its own logic: /register What alternatives exist to Sitemesh that could…
Popcorn
  • 51
  • 1
  • 2
5
votes
1 answer

Accessing the model from a layout view in Grails

I'm using the layout support (sitemesh) in Grails which works fine. I'd like to adjust my layout to have it depend on whether or not a user is logged in or not. My grails-app/views/layouts/main.gsp contains the following code:
knorv
  • 49,059
  • 74
  • 210
  • 294
5
votes
3 answers

Render a page in grails without html and body tag

I want to render a page in grails without a , and tag, I just want DIV and tables. I want to integrate this page in my Facebook page and the requirement of Facebook page is that the page should not contain , or…
Hussain Fakhruddin
  • 3,202
  • 4
  • 25
  • 36
5
votes
3 answers

With JSP, does the taglib URI mean that my site is reliant on the URI resolving?

I'm trying to implement a sitemesh decorator in my site. The example on their site has a full URI linking to their site for the taglib part of the decorator file: <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"…
Chris
  • 39,719
  • 45
  • 189
  • 235
5
votes
1 answer

Struts 2 + Sitemesh 3 integration - NPE in FreemarkerDecoratorServlet

I am using Struts 2 (version 2.3.14.3) together with Sitemesh 3 (version 3.0-alpha-2) and I am getting a NullPointerException under cerain circumstances. First, here is my struts2 / sitemesh configuration from web.xml:
5
votes
1 answer

org.springframework.web.filter.HiddenHttpMethodFilter cannot be cast to javax.servlet.Filter

I have a maven webapp based on spring framework 3 and when I run the application on jetty using maven-jetty-plugin by running the command mvn -e clean jetty:run it runs alright, but when I run it on tomcat using tomcat-maven-plugin by running the…
skip
  • 12,193
  • 32
  • 113
  • 153
5
votes
4 answers

How to unit test a class which extends/inherits a 3rd party class

I have created a new class which extends a 3rd party abstract class. The new class calls methods in the abstract class. The problem I have is when trying to write the unit test, I'm not sure how to write a test as I would not know the exact details…
Ilyas Patel
  • 400
  • 2
  • 11
  • 27
4
votes
0 answers

Sitemesh3 properties

What kind of property can be assigned to sitemesh tag? I know about 3: I try to assign div or section, but without success. Do you know another…
Raknel
  • 529
  • 3
  • 12
4
votes
2 answers

Servlet page decoration: Do people use Tiles, Sitemesh, or something else?

I've used Tiles and Sitemesh for a number of years and while I personally prefer the Sitemesh style page decoration, I generally don't see a lot of mention of Sitemesh or Tiles on the Internet. Do people use Tiles and/or Sitemesh actively, or are…
stevedbrown
  • 8,862
  • 8
  • 43
  • 58
4
votes
1 answer

Getting started with Grails Resources Plugin

I am new to using Grails plugins and this is most likely a novice mistake, but I cannot find documentation that helps me, so here we go. I have added the following file to grails-app/conf : appResources.groovy //appResources.groovy modules = { …
Fresheyeball
  • 29,567
  • 20
  • 102
  • 164
4
votes
1 answer

Choosing an appropriate url pattern for Sitemesh to exclude my servlet from its decorators?

I configured my Spring web app with a servlet to serve images at the URL: /imgsrv?imgid=12345 I also have Sitemesh installed and now when I call this image servlet, I get a decorator exception related to this servlet, which does not need a…
cafe
  • 263
  • 2
  • 8
4
votes
4 answers

Sitemesh, Cannot construct Factory : com.opensymphony.module.sitemesh.factory.DefaultFactory:

I use the version 2.4.2 of SiteMesh with Spring opensymphony sitemesh 2.4.2 I deploy my application with the name myApp.war and…
user5301
  • 41
  • 3
1
2
3
15 16