sitemesh

Internationalization sitemesh

I'm using freemarker, SiteMesh and Spring framework. For the pages I use ${requestContext.getMessage()} to get the message from message.properties. But for the decorators this doesn't work. How should I do to get the internationalization working for sitemesh? ...

java web app decorating/includes issues

Background: we have a system that was written in an older CMS based on Java back during the 2002-2003 days. We want to keep moving forward with our new stuff, using tomcat, stripes, and sitemesh. We have navigation, layouts, "pods", js, css, etc, that we've taken out of the old CMS and into a few of our new apps so we have consistent l...

Are there any good tutorials for using sitemesh in a grails application?

I'm a pretty experienced Grails developer, but most of my experience has been with using grails for serving up JSON/XML to a flex app and some relatively simple HTML websites. I've been diving deeper into using the sitemesh integration in grails and I'm struggling a little to find best practices for some more complex configurations, and...

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: <g:if test="${user}"> Username: ${user.username} </g:if> However, it appears as if the layout-GSP:s are un...

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: <decorators defaultdir="/decorators"> <decorator name="layout-main" page="layout-main.jsp"> <pattern>/jsp/main.jsp<...

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 there other libraries that have taken over in this capacity? ...

Struts2 Sitemesh not working in WAS 6 server

I have a struts2-spring application which works fine in jetty server but when i try migrating it to WAS 6 the decorator(sitemesh) is not getting applied. The server logs shows no error.Is this a known issue ? my web.xml looks like this <filter> <filter-name>action2-cleanup</filter-name> <filter-class>org.apache.struts2.dispatch...

Configuring SiteMesh for specific action mappings in Struts 2?

Hi, I'm trying to configure sitemesh to only take effect for a certain subset of action mappings in my Struts 2 application. Say for example, I have the following struts.xml snippet: <package name="default" namespace="/" extends="struts-default"> <action name="showForm"> <result>/view/form.jsp</result> </action> </package> <pa...

Action tag is forced to use input result if outer action has action errors

I use Sitemesh as template engine with Struts2. In my decorator jsp file, I use for division content source. Now I encounter a problem that if an action has an action error, there will be a "input" result used. It will cause all in decorator JSP file also execute input result directly. That's means method won't be called. How do I ma...

Grails: what are the other alternatives to sitemesh for gsp view layouts?

Sitemesh seems to be an open-source project with minimal activity and small user community. So, I was wondering whether there are (better) alternatives to sitemesh, as a templating layout engine ? And if it is the case, how can one integrate it into a grails application? Thank you, Fabien. ...

In Struts2, how do you share your common html across all pages?

In Struts2, how do you share your common html across all pages? In Asp.net, you've got Master pages, and in Rails there are Layouts. The idea is that your common html (eg the header, menu, and styles) are all easy to maintain because they are in one place, but for the life of me i can't find the equivalent feature in Struts2. Is it cal...

Getting sitemesh to work with struts2

I'm trying to integrate sitemesh into my struts2 app, but i'm finding that it's not making any difference and isn't showing any errors (or anything sitemesh related at all) in the logs. I've started by following all the documentation on the sitemesh site, had no luck, so now i'm trying to copy what's been done in the sitemesh-example do...

sitemesh vs jsp-config (<include-prelude>)

Please help clarifying : In web.xml I have the following <jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <el-ignored>false</el-ignored> <page-encoding>utf-8</page-encoding> <include-prelude>/jstlTaglibs.jspf</include-prelude> </jsp-property-group> </jsp-config> Also in decorators.xml...

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

Hi, 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" %> Does this mean that my site is reliant on being able to access that site? Because i...

Sitemesh + Struts2 + Velocity: Decorators cannot access the context's objects

Hi, I have a struts2 web app using velocity. I am integrating Sitemesh to the project. The decorators are called properly but for some reasons, the objects placed in the context via the toolbox configuration (velocaity related) are not being loaded. Has anyone faced this issue? Thanks a lot ...

Is it possible to extract SCRIPT tags using SiteMesh?

I have custom JSP tags that generate some HTML content, along with some javascript functions that get called by this HTML code. In the current implementation, the SCRIPT tags are created just above the HTML code. To avoid modifying the existing code base, I want to pull up these scripts inside the HEAD section of the page using SiteMes...

Eclipse auto republish does not seem to have any effect sometimes

Hi all, When developing a JSP web application in Eclipse, i'm using the built in J2EE Preview servlet container to host the application, with a browser open to localhost:8080/MyApp to preview things. Sometimes i make a change to the application and wait for the servers view in Eclipse to go from 'Republish' to 'Synchronized', but when ...

Anyone have good complete examples of using sitemesh and layouts in Grails 1.2?

I had a grails 1.1 app working where keyword and description meta tags were dynamically generated. There was a change in how that works in 1.2, but I cannot found good documentation. I've tried numerous ways to make it work. No matter what I do the resultant html gets something like <meta name="keywords"/>" /> instead of the actual...

What is the right syntax for using meta keywords in grails 1.2 app?

I tried having something like " /> in my sitemesh layer. I set the variable in my controller. But it ends up creating broken syntax in the resulting page with an extra double quote and extra right angle bracket. ...

How to avoid using scriptlets in my JSP page?

Hi, I've been told that the use of scriptlets (<%= ... %>) in my JSP pages isn't such a great idea. Can someone with a bit more java/jsp experience please give me some pointers as to how to change this code so its more 'best practice', whatever that may be? This JSP is actually my sitemesh main decorator page. Basically my web design h...