------ Myfaces Core 2.0 on Google App Engine ------ Ali Ok ------ 2010-04-08 ------- ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Myfaces Core 2.0 on Google App Engine ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to run Myfaces on Google App Engine, you need to complete the steps below. Configuration explained in this document is tested with Google App Engine 1.3.0. You can also find tutorials for {{{http://myfaces.apache.org/core20/myfaces2-googleappengine-eclipse-tutorial.html}Eclipse}} and {{{http://myfaces.apache.org/core20/myfaces2-googleappengine-idea-tutorial.html}IntelliJ IDEA}}. * Download a Myfaces Core <<<2.0.0-beta-3>>> or a version released <> than <<<2.0.0-beta-3>>>. Google App Engine support is not available for older versions. Extract and put following files into war/WEB-INF/lib: * myfaces-api-2.0.x.jar * myfaces-impl-2.0.x.jar * commons-beanutils-1.x.x.jar * commons-codec-1.x.jar * commons-collections-3.x.jar * commons-digester-x.x.jar * commons-discovery-0.x.jar * commons-logging-1.x.x.jar * Add following lines into your web.xml. +------------------------------------------------------------------------+ ... org.apache.myfaces.config.annotation.LifecycleProvider org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider org.apache.myfaces.SECRET NzY1NDMyMTA= javax.faces.DEFAULT_SUFFIX .xhtml Faces Servlet javax.faces.webapp.FacesServlet Faces Servlet *.jsf ... +------------------------------------------------------------------------+ * Enable sessions on App Engine. To do this, add line below to war/WEB-INF/appengine-web.xml. +------------------------------------------------------------------------+ true +------------------------------------------------------------------------+ * Although Google App Engine is said to support JSP 2.1, JSP implementation version(2.0) does not match JSP API version(2.1). So, we need to supply Unified Expression Language implementation jars. You can find them {{{https://uel.dev.java.net/}here}}. Put el-api-1.x.jar and el-impl-1.x.jar into war/WEB-INF/lib. * If you have a faces-config.xml, please check that you use the header for JSF2: +------------------------------------------------------------------------+ ... +------------------------------------------------------------------------+ * Here is the <> directory structure: +------------------------------------------------------------------------+ + + src + META-INF - jdoconfig.xml + war - somepage.xhtml + WEB-INF - appengine-web.xml - faces-config.xml - logging.properties - web.xml + lib - appengine-api-1.0-sdk-1.3.0.jar - appengine-api-labs-1.3.0.jar - commons-beanutils-1.7.0.jar - commons-codec-1.3.jar - commons-collections-3.2.jar - commons-digester-1.8.jar - commons-discovery-0.4.jar - commons-logging-1.1.1.jar - datanucleus-appengine-1.0.4.1.final.jar - datanucleus-core-1.1.5.jar - datanucleus-jpa-1.1.5.jar - el-api-1.1.jar - el-impl-1.1.jar - geronimo-jpa_3.0_spec-1.1.1.jar - geronimo-jta_1.1_spec-1.1.1.jar - jdo2-api-2.3-eb.jar - myfaces-api-2.0.0-beta-3.jar - myfaces-impl-2.0.0-beta-3.jar +------------------------------------------------------------------------+