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
- In the administrative console panel, click . 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. |
- To use your own JSF implementation, click in the administrative
console.
- Select Sun Reference Implementation 1.2 as the JSF implementation.
- Add your implementation as an isolated shared library.
Refer to the Creating shared libraries topic for details.
- Associate the isolated shared library to the Web module
class loader in the application.
- Click Ok.
- 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.