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
2
votes
2 answers

Where to find sitemesh 2.4.1 source?

The download link to get the source in sitemesh site is not working. Does anyone have an alternate site?
Yasser
  • 575
  • 1
  • 4
  • 19
2
votes
1 answer

Is it possible to define a decorator directly in a JSP with Sitemesh?

I know I should define decorators in a configuration file or my own subclass of ConfigurableSiteMeshFilter. For example: public class SitemeshFilter extends ConfigurableSiteMeshFilter { @Override protected void…
Nowaker
  • 12,154
  • 4
  • 56
  • 62
2
votes
3 answers

Advanced templating with jsp and sitemesh

Here's what i am trying to do: I have a main template with header, menubar, body and footer. The body is replaced by the actual page called with the help of sitemesh like this:
Same for the title…
Maxime ARNSTAMM
  • 5,274
  • 10
  • 53
  • 76
2
votes
1 answer

Why is my browser downloading file instead of rendering SpringBoot & Sitemesh output?

I'm trying to use SpringBoot with Freemarker and Sitemesh. When I go to a URL at the moment the request is handled by the application, data loaded and HTML output generated, but for some reason the browser has decided it wants to download the file…
DaFoot
  • 1,475
  • 8
  • 29
  • 58
2
votes
0 answers

How can i get the exclude url in decorator.xml of sitemesh

I use sitemesh to decorate my application.And config a decorator.xml as follow to make some url not decorated by sitemesh.
yonney.yang
  • 135
  • 8
2
votes
2 answers

Why does calling the security authentication property `principal.displayName` in a decorator throw an exception?

Is there a reason why calling the security authentication property principal.displayName in a decorator would cause a problem? I'm setting it as a variable in a sitemesh decorator:
apfel
  • 217
  • 1
  • 8
  • 11
2
votes
2 answers

Spring MVC rendered JSP truncated when containing special characters

If I pass variables with extended characters to my JSP, the end of the rendered file is truncated by 2 bytes for each non-ascii character. Why is this so? Here is an example. My Controller: import org.springframework.stereotype.Controller; import…
Jason
  • 225
  • 1
  • 7
2
votes
0 answers

JSP Include - Remove white space/new line

I'm trying to minify HTML in one line. For now I am using Sitemesh 3 filter and Htmlcompressor taglib but the problem is that when I import CSS files each file ends with new line so my HTML is not in one line. <%@ page…
Milos Miskone Sretin
  • 1,748
  • 2
  • 25
  • 46
2
votes
1 answer

How sitemesh decorator works without pattern?

I have below configuration under my decorator.xml.
user3198603
  • 5,528
  • 13
  • 65
  • 125
2
votes
4 answers

sitemesh and spring MVC decorator pattern problems

I have sitemesh with spring working, this is the configuration: decorator.xml /exclude.jsp /exclude/*
atomsfat
  • 2,863
  • 6
  • 34
  • 36
2
votes
1 answer

spring boot runs but the pages are not accessible

When I access my app via browser I get an 404 (Whitelabel Error Page). After searching around, I think it could be a problem with my sitemesh filter. @Bean public FilterRegistrationBean sitemesh() throws Exception { FilterRegistrationBean…
Kian
  • 695
  • 2
  • 11
  • 23
2
votes
0 answers

Sitemesh3 custom properties

Currently I am trying custom properties to my decorator for additional javascript files for a specific template. In my decorator I have tried using: And in my JSP I tried:
Jamie
  • 1,909
  • 3
  • 22
  • 47
2
votes
0 answers

Spring Boot with SiteMesh 3

I'm writing a new web app using Spring Boot for the first time and am trying to use SiteMesh 3 without success. I'm using a web initializer to bootstrap; public class WebInitializer extends SpringBootServletInitializer { @Override protected…
BobbyD
  • 21
  • 1
  • 4
2
votes
2 answers

How to prevent sitemesh from parsing html in textarea

I use sitemesh for page decoration in my web app. I have a form where the contents of a textarea field is a complete html page. The problem is that when Sitemesh parses this page it extracts the title, head and body from my textarea field and…
Henrik Barratt Due
  • 5,614
  • 1
  • 21
  • 22
2
votes
0 answers

Re-use Sitemesh layout

I have a few webapps that I want to reuse an identical layout for. I was hoping I could bootstrap the layout via dependency consumption with the simplest method being:
Droo
  • 3,177
  • 4
  • 22
  • 26