14
2009
Getting Sitemesh running on Google App Engine
I’ve been having a ball playing with Gaelyk for developing Google App Engine applications in Groovy. One thing that Gaelyk lacks (for now! It’s only 0.3.x) is any kind of layout engine like Sitemesh. No probs, just add then the Sitemesh filter to your web.xml and you’re off, right?
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Well that would be wonderful! However Sitemesh 2.4.1 has some integration points with JNDI that will bring you a world of hurt (Error 500) along with a description in your app engine logs. It will work locally, but fail once deployed. For later googlers, here’s the strings from the appengine logs:
Error for / java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.apphosting.runtime.security.shared.stub.javax.naming.InitialContext.(InitialContext.java) at com.opensymphony.module.sitemesh.Factory.getEnvEntry(Factory.java:91)
Fortuntely some kind soul has documented the fix for that Factory class already. Followed those instructions and I was in business.
Now, onto some more DataStore experiments with Gaelyk…
4 Comments + Add Comment
Leave a comment
Glen Smith
Archives
- January 2012
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- April 2011
- March 2011
- January 2011
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003

An article by Glen





Actually, SiteMesh 2.4.2 was fixed and works well on App Engine:
http://joewalnes.com/2009/04/17/running-sitemesh-on-appengine/
And (although I’ve not tried it yet), I think SiteMesh 3 (still alpha as the author says) is certainly working out of the box as well without any fix either.
Wow! My bad…. it seems that the active fork of sitemesh is now at java.net (https://sitemesh.dev.java.net/). But the standard downloads (http://www.opensymphony.com/sitemesh/) don’t point over there. Bugger.
Oh well. I’m glad there’s an official version to work off. Thanks for setting me straight!
hi
I too tried sitemesh on appengine these days. But found velocity does’t work on appengine.
Have you guys tried velocity on appengine ?
Sorry mate. Haven’t done anything with Velocity. There is a page on which libraries are known good with app engine http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine. Can’t see Velocity there though.