Configuring JavaServer Faces implementation

Use this task to specify which JavaServer Faces implementation to use. You can use the Apache MyFaces or the SUN Reference Implementation of JSF 1.2 or your own implementation.

Before you begin

Ensure that your application is configured for JavaServer Faces (JSF) using the specific web.xml context parameters for the implementation that you have chosen.

About this task

The Application Server JSF engine determines if the SUN Reference Implementation 1.2 or Apache MyFaces 1.2 is used from the Application Server runtime. If either is used, the correct listener class is registered with the Web container. You do not need to add the com.sun.faces.ConfigureListener or the org.apache.myfaces.StartupConfigureListener to your web.xml file.

Be Aware: If the you want to use a third party JSF implementation that is not shipped with the product, then:
  • Keep the configuration set to the SUN RI.
  • Add the third party listener to the web.xml file that is required.
  • Add the third party implementation Java archive (JAR) files to the application as an isolated shared library.

You can also configure the JSF implementation on the Provide JSP reloading options for Web modules panel for application installation and update wizards.

Procedure

  1. In the administrative console panel, click Applications > Application Types > WebSphere enterprise applications > application_name > JSP and JSF options. Select one of the following implementations:
    Option Description
    Sun Reference Implementation 1.2 Select this option to use the Sun Reference Implementation 1.2 JSF implementation. This is the default JSF implementation.
    MyFaces 1.2 Select this option to use the MyFaces 1.2 JSF implementation.
  2. To use your own JSF implementation, click Applications > Application Types > WebSphere enterprise applications > application_name > JSP and JSF options in the administrative console.
    1. Select Sun Reference Implementation 1.2 as the JSF implementation.
    2. Add your implementation as an isolated shared library. Refer to the Creating shared libraries topic for details.
    3. Associate the isolated shared library to the Web module class loader in the application.
  3. Click Ok.
  4. Recompile the JSP files that contain the JSF implementation. You can set the JSF engine configuration paramater, com.ibm.ws.jsf.JSF_IMPL_CHECK, to true to automatically mark the JSP files to recompile at application startup.

Results

If MyFaces is selected, then the MyFaces implementation is added to the application through an isolated shared library and the entire application uses the MyFaces implementation. Using both the SUN Reference Implementation and the MyFaces implementation within the same application is not supported.

What to do next

Configure JSF engine parameters as necessary.



In this information ...


Related concepts

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Feb 5, 2014 9:49:51 PM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=twebjsf
File name: tweb_jsf.html