WAS v8.5 > Develop applications > Develop web applications > Assemble web applications > Configure JavaServer Faces implementation

Configure JavaServer Faces implementation

Use this task to specify which JavaServer Faces implementation to use. We can use Apache MyFaces 2.0 or the Sun Reference Implementation 1.2 of JSF, or our own implementation.

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

The JSF implementation is a server-wide configuration setting. Thus, if we have multiple applications which require different JSF implementations, you must separate the applications into different application servers or clusters, and specify the implementation by following the steps in this topic for each application server or cluster. Alternatively, we can use an isolated shared library, as described for third-party JSF implementations, as follows.

For transitioning users: The Application Server JSF engine determines if the Sun Reference Implementation (RI) 1.2 or Apache MyFaces 2.0 is used from the Application Server run time. If either is used, the correct listener class is registered with the web container. We do not need to add the com.sun.faces.ConfigureListener or the org.apache.myfaces.StartupConfigureListener to your web.xml file.trns

Be Aware: To use a third-party JSF implementation not shipped with the product, then:

  1. Add the third-party listener to the required web.xml file.

  2. Add the third-party implementation JAR files to the application as an isolated shared library and associate it with the application:

    1. Move the JSF JAR files to a directory outside of the application.

    2. Create the isolated shared library. See topic Create shared libraries for information about how to create the shared library.
    3. Ensure the classloader is set to PARENT_FIRST, the default value. To view the current configuration in the dmgr console panel, click Applications > Application Types > WebSphere enterprise applications > application_name > Class loading and update detection.

    4. If we are using a third-party MyFaces implementation, set the JSF implementation to Sun RI. To change this configuration in the dmgr console panel, click Applications > Application Types > WebSphere enterprise applications > application_name > JSP and JSF options. Under JSF implementation, select Sun RI from the drop-down menu. If we are using a different third-party JSF implementation, keep the JSF implementation set to the default value.

  3. Restart the application server.

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

Configure the server or cluster to use the JSF implementation you want. We can do this task using the dmgr console or wsadmin.


Results

Configure JSF engine parameters as necessary.


Subtopics


Related concepts:

JavaServer Faces
JWL
JavaServer Faces


Related


Configure Portlet Bridge for JavaServer Faces
Manage JavaServer Faces implementations using wsadmin.sh
Create shared libraries
Associate shared libraries with applications or modules


Reference:

JSF engine configuration parameters


+

Search Tips   |   Advanced Search