JavaServer Faces
WAS v855 supports JavaServer Faces 2.0 runtime...
- Reusable user interface components
- Manage user interface state across server requests
- model for wiring client-generated events to server-side application code
- Custom user interface components
Both the Sun Reference Implementation and Apache MyFaces implementation are shipped with the product.
The JSF runtime resides in the normal runtime library location. Loading the JSF servlet works in the same manner as if the runtime was packaged with the web application. The bundled version of JSF includes enhancements for integration with annotation scanning.
Classes for JSF (javax.faces.*), and the IBM modified version of Apache MyFaces JSF and Sun JSF are packaged in the Application Server run time.
Web applications that use the framework typicall embed the JSF API and JAR files within their WAR file. This practice is not required when these web applications are deployed and run within WebSphere Application Server. Only the removal of these JAR files, along with any JSTL JAR files from the WAR file, is required.
Because JavaServer Faces 2.0 is a part of Java EE, a web application does not need to bundle a JavaServer Faces implementation when it runs on a web container that is Java EE compliant. If a JavaServer Faces implementation is bundled with a web application, it is ignored as the JSF implementation provided by the platform always takes precedence.
The JSF run time for WAS v855 does not support the use of a single class loader for the entire application when the application contains multiple web modules, and one of those modules is a JSF module. A single class loader for the entire application is not supported because the FacesConfig initialization requires a single class loader for each JSF module to perform the initialization. Use multiple class loaders when the application contains multiple web modules, and at least one JSF module.
For using different implementations of JSF, the WAS JSF engine determines if SUN RI or Apache MyFaces is used from the application server run time. After the JSF engine determines the implementation used, the correct listener class is registered with the web container. You do NOT need to edit web.xml and add either...
- com.sun.faces.ConfigureListener
- org.apache.myfaces.StartupConfigureListener
To use a third party JSF implementation not shipped with the product, leave the configuration set to MyFaces, add the third party listener to web.xml, and add the third party implementation JAR files to the web module as an isolated shared library. Using an isolated shared library, the web application version of the JSF or JSTL classes load before the Application Server.
Related concepts
JavaServer Faces widget library (JWL)Configure Portlet Bridge for JavaServer Faces Configure JavaServer Faces implementation Configure JavaServer Faces implementation Manage JavaServer Faces implementations Task overview: Deploy web applications Develop web applications Configure JSF engine parameters JSF engine configuration parameters