Wednesday, April 08, 2009

JSF on Google App Engine

OK, so Java on GAE is straight forward. See the previous post for a quick demo using GWT.

How about JSF? Hmm, not as straight forward if you are trying to use JSF 1.2 and MyFaces. In fact, I can't get it to work. I get as far as this error:

java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;

Which would suggest that there is something wrong with the version of JSP that is being used? GAE uses Jetty under the covers, but I'm not sure which version. I would have thought it was a version that supports JSP 2.1, but who knows. The SDK comes with Geronimo JSP 2.1 and Servlet 2.5 jars, so you would think it would work.

Anyhoo, JSF works with MyFaces 1.1 and you can see a quick demo here. It doesn't do much at the moment, but I'll play around with it and see if I can do something a little better.

I have a Java/Swing application that uploads old Polar HRM data to the new Polar web site. This is an ideal application to convert to JSF/Facelets/RichFaces and host on GAE. Watch this space (well, come back in a few months ;) )


KuKei'Blog said...

I want to use ajax4jsf,but i get error :"java.lang.NullPointerException
at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(";

Curly said...

Haven't tried ajax4jsf yet. That was one of my next steps. I'll post if I get it working or not.

morsi_j said...

Is Richafaces works on appspot ?
it Works fine in my machine to the local adress.
I had that stacktrace in the log of appspot:

rg.apache.myfaces.webapp.StartupServletContextListener initFaces: Error initializing ServletContext
at javax.faces.FactoryFinder.newFactoryInstance(
at javax.faces.FactoryFinder.getFactory(
at org.apache.myfaces.config.FacesConfigurator.configureRenderKits(

Please, i need help

Curly said...

I didn't get RichFaces to work - see this post ->

This thread -> has some discussion on JSF issues in general.

The GAE forum has some more comments on JSF/RichFaces issues ->

Duduzerah said...

Maybe this project can help you.

Curly said...

Thanks, I'll look into it.

Ali Ok said...

App Engine support is there for JSF since MyFaces 2.0.

You can take a look at

It would be great if you can edit your post and add a footnote.


Curly said...

Cool, thanks for that. I've some time on my hands on the next week or two so may revisit this.

Post a Comment