Oracle ADF Faces - Installation
Dependencies

Dependencies of ADF Faces include:

  • Either JSF 1.1.01 reference implementation or MyFaces 1.0.8 or later, and their respective dependencies. Please note that ADF requires JSF 1.1, and cannot run on a server that only supports JSF 1.0.
  • The ADF Share library (adfshare.jar)

Deliverables

The ADF Faces deliverables are:

  • adf-faces-api.jar: public APIs of ADF Faces, all in the oracle.adf.view.faces package
  • adf-faces-impl.jar: private APIs of ADF Faces, all in the oracle.adfinternal.view.faces package

Developers are strongly encouraged to compile against the API JAR only - this will ensure that you are only using public APIs. (Note that use of any APIs in oracle.adfinternal is entirely and permanently not supported.) JDK 1.4,which is a part of JDeveloper 9.0.5.2, is required to compile.

General Installation

ADF Faces is designed to run on any J2EE-compliant application server. To install ADF Faces outside of a JDeveloper-based environment, take the following steps:

  1. Install either JSF 1.1.01 reference implementation or MyFaces 1.0.8 or later, and their respective dependencies. Please consult your application server provider for documentation on this step.
  2. Install the ADF Faces libraries and dependencies in WEB-INF/lib .
  3. Register the ADF Faces filter in your WEB-INF/web.xml :
      <filter>
        <filter-name>adfFaces</filter-name>
        <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
      </filter>
    
      <filter-mapping>
        <filter-name>adfFaces</filter-name>
        <!-- This assumes that the FacesServlet has been registered -->
        <!-- under the name "faces" -->
        <servlet-name>faces</servlet-name>
      </filter-mapping>
    
    
  4. Tell JSF to use the ADF Faces RenderKit by adding the following to your faces-config.xml:
      <application>
        <default-render-kit-id>
          oracle.adf.core
        </default-render-kit-id>
      </application>
    
    
  5. Register the ResourceServlet that would be used for serving the resources at runtime(images, javascripts and styles):
     <servlet>
      <servlet-name>resources</servlet-name>
      <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
     </servlet>
    
    <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    
    

In addition, it is strongly recommended that you enable client-side state saving, again in WEB-INF/web.xml . ADF Faces offers a much improved version of client-side state saving that is a significant improvement over standard server-side state saving. State is still saved in the HttpSession , but a token is sent to the client to disambiguate instances of a page, and session-based state is serializable to support failover.

  <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>

Demos

The demos are available in adf-faces-demo.war.

One of the demos allows you to check email. If you are not running in a J2EE 1.3 (or higher) server you will need to add the jars listed below to adf-faces-demo/WEB-INF/lib. For example you will need to follow these steps if you are using Tomcat, but not if you are using OC4J or JDeveloper (in JDeveloper you do need to add the available J2EE library).

  • JavaMail - go to download button for "Download JavaMail API Implementation Version 1.2 " and download 'javamail-1_2.zip'. Extract the jar:
    • mail.jar
  • JavaBeans Activation Framework - go to the download button and download 'jaf-1_0_2-upd.zip'. Extract the jar:
    • activation.jar

To access the demos, start at index.jspx.

Platform Information

The following is not a list of officially supported platforms, rather this list is just to provide information about deploying the demo WAR on different platforms. The following setup information is all for Windows, but the release runs on any Java platform which meets the dependency requirements.

Platform Version Demo War Deployment
Oracle JDeveloper 10g 10.1.3.0.4 - Production ADF Faces is built in to the production release. Please see the help in JDeveloper to write an ADF Faces application.
OC4J 10g standalone

9.0.4 build# 040317 . (alternate access here ).

Deploying to standalone OC4J

  1. Please make sure you are using a version listed in this table, or the stand alone OC4J that is available as a part of JDeveloper 9.0.5.2 installation.
  2. Install OC4J standalone. Be sure to complete the installation steps mentioned in readme.txt in the directory where OC4J is installed. Also ensure that J2SE 1.4.1 is correctly installed, and the 'bin' subdirectory from this installation is added to your 'path' environment variable so that OC4J finds the java compiler.
  3. Copy the demo WAR in a sub directory of [J2EE_HOME ] . In this example we've assumed it was copied to '[J2EE_HOME ] /applications' directory.
  4. The default application shipped with OC4J is described in the file [J2EE_HOME ] /config/application.xml. Add the following entry in application.xml inside of < orion-application > element.
            <web-module id="adf-faces-demo" path="../../home/applications/adf-faces-demo.war" />
            
    Save application.xml. We have now added the web module of the WAR into the default application. However, we still need to make this module accessible from the web by editing [J2EE_HOME ] /config/http-web-site.xml.
  5. Add the following entry in http-web-site.xml inside of < web-site > element.
            <web-app application="default" name="adf-faces-demo" root="/adf-faces-demo"/>
            
    Save http-web-site.xml. Start OC4J. The value of the 'application' attribute should be the same as the id field in step 3. The root field is the one that dictates what URL to use to get the initial file of this application. Note that there is nothing sacrosanct about the application id and the root value - it could be anything.
  6. The ADF Faces demos can now be accessed from your browser: http://[server ] :[port ] /adf-faces-demo Eg. http://localhost:8888/adf-faces-demo/faces/index.jspx

Tomcat 4.x, 5.x

To run the email demo, make sure you have the mail and activation jars .

If you are using Tomcat 4.x add the following servlet mapping to <Tomcat>/conf/web.xml in the <servlet-mapping> section.

                     <servlet-mapping>
                       <servlet-name>jsp</servlet-name>
                       <url-pattern>*.jspx</url-pattern>
                     </servlet-mapping>
                 

If you are using Tomcat 5.x or above, this step is not required.

Please see the FAQ for additional setup information.

Copyright © 2003-2006, Oracle Corporation. All Rights Reserved.

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy