views:

607

answers:

2

I would like to do some more learning of facelets. Now that java is a supported Google app engine language, is there anything in the facelets implementation that would prevent use on app engine?

Edit: This page at google now has a list of various frameworks and their status in regards to app engine. http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?hl=en

+2  A: 

I haven't tried it, but I don't imagine it would be any different from using Struts or Spring. As long as you can deploy with all the JARs you need in your WAR it should work.

The only question is whether JPA or JDO are sufficient. If the facelets require any other persistence mechanism you might have a problem.

JMS isn't available either, so features that depend on it can't work.

Isn't the first access limited? First 10,000 get in?

duffymo
Facelets doesn't have any persistence requirements AFAIK, so that shouldn't be a problem. Thanks for the info. Yes, first 10k get in. I happen to be one of the lucky 10k.
digitaljoel
It looks like some people have been successful with facelets 1.1, but not 1.2, as shown int the thread list here:http://www.seamframework.org/Community/SeamGoogleAppEngine
digitaljoel
+1  A: 

The 1.2 version of JSF was not working - because by default it would try to spawn threads. That's not allowed in GAE.

This is fixed in the latest version of JSF 1.2 (build 13), as well as the 2.0 Beta 2 release - and you can download the latest versions from here: https://javaserverfaces.dev.java.net/

You need to add the a context parameter to your web.xml:

com.sun.faces.enableMultiThreadedStartup which defaults to true. This option must be set to false when deploying to GAE.

Jim Driscoll
I saw the email on the appengine-java list. Nice to have it here too. Thanks for all the work you guys do on JSF.
digitaljoel
Jim, if 2.0 Beta 2 works on GAE, does that mean I can use facelets since they are built-in on 2.0?
digitaljoel
Yes, JSF 2.0 has Facelets as it's preferred way of displaying pages, and that should work fine in GAE.
Jim Driscoll
For the record, I had to modify the JSF 2.0.2 source in order to get it running in app engine. Even after setting the context parameter, there was a problem with it trying to do JNDI settings. I detailed my fix in my blog post.http://digitaljoel.wordpress.com/2009/12/21/jsf-2-0-2-and-google-app-engine/
digitaljoel
Hmph. Well, that's distressing. I've filed a bug:https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1594For the record, you can always file a bug as well - the developers do their best to keep on top of them, and don't know there's a problem unless you tell them. (Sadly, I'm no longer among their number, having started a new job).
Jim Driscoll