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
1
vote
3 answers

Disable sitemesh for grails scaffolds?

How do I disable templating and sitemesh for scaffold-enabled controllers? I want to display the full scaffold here, and my main template is screwing with this.
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
1
vote
1 answer

Remove decorator from error page

We use sitemesh for decorations on our website. We have an error page and we would not like to apply the decorator to it. The error page comes up in case an exception occurs (we hope rarely), not for 404, that's another page. The error page is…
Krt_Malta
  • 9,265
  • 18
  • 53
  • 91
1
vote
1 answer

using sitemesh with struts2

Can anyone tell me how to use Sitemesh. I have created a layout page and header and footer. Header and Footer are included from separate pages as static <%@include >. Now I want the middle part "content" to vary keeping header and footer same. How…
Akhil K Nambiar
  • 3,835
  • 13
  • 47
  • 85
1
vote
0 answers

How to write Sitemesh configuration withouw WEB.XML

When the project was launched, the mesh site worked in web.xml. But now I want to run it without web.xml and i deleted him. I wrote the code it seems to be correct, but you can tell where you made a mistake or did not write correctly. He doesn't…
Blabla2030
  • 17
  • 7
1
vote
1 answer

Spring MVC 3 redirect / forward with sitemesh

Greetings all, I am using spring mvc 3 + sitemesh and spring security 3. i need to do the following scenario. i am using 2 different layouts for the bypassing users and normal users. the approach i followed was working fine until i came across with…
Sam
  • 2,055
  • 6
  • 31
  • 48
1
vote
1 answer

multi pages in same decorator configuration file

I use decorator template with sitemesh and have a decorators.xml file like: /styles/* /scripts/*
1
vote
1 answer

Spring Framework Error Controller with Freemarker

I have problem. Every time I have exception happening my spring error controller either bypasses my sitemash-freemarker decorator and just shows the error dump. Or it includes the decorator but doesn't put in the user session so the personalization…
MatBanik
  • 26,356
  • 39
  • 116
  • 178
1
vote
1 answer

Merging JavaScript code into the with sitemesh and jsp's

I'm using sitemesh to decorate my web pages. Can someone guide me on the best practice. The header.jsp and sidebar.jsp have JavaScript code dependencies and I would like to merge these into the head along with the main page which is being…
jaseFace
  • 1,415
  • 5
  • 22
  • 34
1
vote
0 answers

Sitemesh 2.4.2 decorator issue with pattern

I am using sitemesh 2.4.2 and while it seems to be OK according to configuration when the decoration process begins for layout.jsp I get the following error: Servlet failed with an Exception java.lang.RuntimeException: java.io.IOException: Stream…
1
vote
3 answers

sitemesh and UTF-8 encoding

I have an spring-mvc application that is using sitemesh. The problem that I have is that my pages need to be UTF-8 but sitemesh supports ISO-8859-1 charset. Is it possible to configure Sitemesh to work with UTF-8 pages? I am using a simple example…
Makis Arvanitis
  • 1,175
  • 1
  • 11
  • 18
1
vote
2 answers

Spring and SiteMesh Error Page is not decorated (skips main filters)

I've been struggling with a rather absurd problem for a few days now: The project I'm on is using Spring MVC with FreeMarker for it's templating. This is running atop a Tomcat container (testing locally using Cargo). The issue I'm working has the…
Minothor
  • 316
  • 4
  • 15
1
vote
0 answers

Is there a practical way to render modified scaffolding templates without restarting in Grails 3?

I added code which I thought would do the job, but it looks like GrailsLayoutView is somehow interfering with it. I have a plugin with the following code: def watchedResources = "file:./src/main/templates/scaffolding/*.gsp" void…
1
vote
0 answers

How can I remove sitemesh exclude config dynamicly in filter?

I hava an sitemesh decorator.xml like this: /merchant/brand/* /merchant/spu
yonney.yang
  • 135
  • 8
1
vote
1 answer

Sitemesh, periodic refresh duplicates header and footer (Struts2 action)

I am using sitemesh defined jsp in decorator xml which needs to be refresh for every min. After refresh the page is duplicating header and footer. I am using jQuery setInterval for refresh every min and given action name in load with div. Can…
Colours
  • 21
  • 1
  • 6
1
vote
3 answers

Extracting a DIV's content using Sitemesh Decorators

I would like to know how I can extract the content of a specific DIV using decorators, instead of using which will fetch all the content inside the tag.
paul87
  • 15
  • 1
  • 4