Rechercher dans ce site

MyFaces2, JSF2, Hello World on Google App Engine GAE/J

>> 30 April 2010

This tutorial is tested using :
Eclipse for JEE Developers 3.5
Google App Engine SDK 1.3.3
Google Plug-in for Eclipse 1.3.2
EL 1.1

Installing Myfaces 2 on GAEJ in three simple steps :
1.Download and copy some libraries in "WEB-INF/lib" folder of your web application
2.Add some configuration to web.xml and enable sessions in
3.Launch and test

Download :
Go to
download "" or later version
Go to
Download "el-api-1.1.jar " and "el-impl-1.1.jar"

Unzip ""

Create a new web project
Click on "New Web Application Project"
Give a name to your project and package
Uncheck GWT (Use Google Web Toolkit)
Click on "Finish"

Copy jars

  • Select all jars in "myfaces-core-2.0.0-bin/lib"
  • Drag and drop into WEB-INF/lib
  • Select "el-api-1.1.jar " and "el-impl-1.1.jar"
  • Drag and drop into WEB-INF/lib

Edit web.xml
You can delete <servlet> and <servlet-mapping> created by new project
Add the following lines (really the minimum) to web.xml


    <servlet-name>Faces Servlet</servlet-name>
    <servlet-name>Faces Servlet</servlet-name>


Edit appengine-web.xml


Edit hello.xhtml

in war folder
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


    <html xmlns="" xml:lang="en" lang="en"



          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

          <title>Hello World JSF 2 using MyFaces 2.0 on the Google App Engine!</title>




             Hello World !!!



Run your web applications
Right click your project -> Run As -> Web Application

Execute hello.xhtml
Type in your browser http://localhost:8888/hello.jsf
In order to display hello.xhtml, you enter hello.jsf

Enjoy !

Reference :


Oleg Mazurashu May 3, 2010 at 11:01 AM  

It is very interesting. I will try this.
Thank you.

Anonymous,  May 3, 2010 at 3:14 PM  

Running a server-side UI framework on GAE is just bad practice, you'il be paying through the nose for extra bandwidth/cpu cycle outdated technologies like this use.

Imho if you are going GAE you should really consider GWT/Flex to make it profitable/interesting.

Demetrio Filocamo May 5, 2010 at 10:15 AM  

jsf2 outdated?? oh my god...

thanks good article!

I would like to see CDI/Weld working on GAE as well...

Demetrio Filocamo

Post a Comment

  © Blogger template Simple n' Sweet by 2009

Back to TOP