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

What is sitemesh

I have seen Sitemesh used with Spring and Freemarker(FTL). So I want to know what is Sitemesh and its use with FTL, with example.
Sandeep Kumar
  • 13,799
  • 21
  • 74
  • 110
3
votes
1 answer

Case Sensitive URL

I've launched a small website. I have found that I'm getting errors by users and upon investigation see that the urls they are trying to use are all lowercase whereas I've declared them as camelCase. I've no idea why these users should be trying to…
Ken Alton
  • 686
  • 1
  • 9
  • 21
3
votes
0 answers

logout button in navbar spring using sitemesh

I followed spring security tutorials but all of them are giving status of login in the page, not in navbar like usually websites do. I wanna show username in navbar after user logs in and logut button, I am using sitemesh and navbar…
mansoor67890
  • 121
  • 1
  • 2
  • 11
3
votes
1 answer

Rendering gsp / view with layout doesn't work

I have different kinds of html emails i want to send to my users, but each email uses the same layout (emailLayout.gsp). I need to render this emails (gsp) to string, to send them via an email method. Using this code this does work, but i need it…
whitenexx
  • 1,350
  • 2
  • 25
  • 53
3
votes
1 answer

How should I use custom SiteMeshFilter with an implementation of Spring's AbstractAnnotationConfigDispatcherServletInitializer?

I had a working implementation of the SiteMeshFilter in my project, but since moving to extending AbstractAnnotationConfigDispatcherServletInitializer instead of WebApplicationInitializer my sitemesh filter isn't being used. I've been trying to…
DaFoot
  • 1,475
  • 8
  • 29
  • 58
3
votes
1 answer

sitemesh vs jsp-config ()

Please help clarifying : In web.xml I have the following *.jsp false utf-8
Nrj
  • 6,723
  • 7
  • 46
  • 58
3
votes
2 answers

grails/sitemesh layout set attribute (ng-app) in html child element

I have a couple pages that share a layout. I am adding some new pages that are going to be using angular. I am trying to find out how to set it up the template so in the child pages I can add to the html elements attribute a…
Nix
  • 57,072
  • 29
  • 149
  • 198
3
votes
2 answers

Decorating a multi-client webapp

I have a web-app in Java, Spring, Struts 2 and Hibernate, that servers multiple clients. Each client with multiple users. To create a personal feel for each client, i would like to customize the header for each client. I'm using sitemesh as…
user829237
  • 1,719
  • 8
  • 37
  • 61
3
votes
2 answers

sitemesh with multiple decorator files

I want multiple decorators, as documented here: https://github.com/sitemesh/sitemesh2. I provide multiple decorators in decorators.xml but the main decorator gets applied to every file in my project. E.g. my decorators looks like this:
Kevin
  • 24,871
  • 19
  • 102
  • 158
2
votes
1 answer

sitemesh 3 safe to use in production?

I'm new to decorators in java, i've discovered that sitemesh offers a good deal of simplicity and flexibility.I've noticed that the stable version 2 is not much in development(i might be wrong) and that there is a new website for 3 which is still in…
black sensei
  • 6,528
  • 22
  • 109
  • 188
2
votes
3 answers

Sitemesh and Freemarker with Jersey resources

I have got a Jersey-based application, which for HTML requests uses Freemarker to generate HTML from templates programatically; @GET @Produces("text/html") public Response getResources(@PathParam("name") String name) { LOG.info("got a request…
scot
  • 1,194
  • 14
  • 26
2
votes
0 answers

Framework/Library like Sitemesh

I am looking at a UI framework similar to Sitemesh http://www.sitemesh.org/ Just to add, I am planning to have a Java based web app, which would be based on fluid design and would have "slightly" different layouts for desktop/mobile/tablet. (e.g.…
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
2
votes
1 answer

Sitemesh layout doesn't work with g.include tag in Grails

I am rendering a view that combines a g.include invocation and a sitemesh layout. The view would be something like this: myview.gsp ... within the body there…
Pablo Duranti
  • 19
  • 1
  • 3
2
votes
1 answer

sitemesh grails: how to handle scripts in templates

I have a layout main.gsp including scripts before the /body tag: Index.gsp is a page which has main.gsp has a template, and uses to include some javascript, so that all scripts stay…
standup75
  • 4,734
  • 6
  • 28
  • 49
2
votes
1 answer

problem while working with spring mvc and sitemesh

I have a sitemesh with spring working. Here is my sitemesh.xml
rokonoid
  • 23
  • 1
  • 4