JavaServer Faces

JavaServer Faces (JSF) is a user interface framework or application programming interface (API) that eases the development of Java-based web applications.

New feature New feature: WebSphere® Application Server supports JavaServer Faces 2.0 at a runtime level.newfeat
The JSF runtime also:

Both the Sun Reference Implementation and Apache MyFaces implementation are shipped with the product.

The Apache MyFaces JSF Implementation provides the foundation of the code used for the JSF support in WebSphere Application Server. The version of the JSF runtime provided by the Application Server resides in the normal runtime library location and is available to all web applications that use JSF APIs. Loading the JSF servlet works in the same manner as if the run time was packaged with the web application. The bundled version includes enhancements for better integration with the built-in annotation scanning and other runtime components of WebSphere Application Server.

The specification-related classes (javax.faces.*) for JSF and the IBM® modified version of the Apache MyFaces JSF Implementation and the JSF Sun reference implementation are packaged in the Application Server run time.

Typically, web applications that use this API/Framework embed the JSF API and implementation Java archive (JAR) files within their web application archive (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. However, because JavaServer Faces 2.0 is a part of the Java Platform, Enterprise Edition (Java EE) platform, a web application does not need to bundle a JavaServer Faces implementation when it runs on a web container that is Java EE technology compliant. If a JavaServer Faces implementation is bundled with a web application, it is ignored as the JavaServer Faces implementation provided by the platform always takes precedence.

The JSF run time for WebSphere Application Server does not support the use of a single class loader for the entire application. This support is not available 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. Therefore, you must use multiple class loaders when the application contains multiple web modules and at least one JSF module.

For using different implementations of JSF, the WebSphere Application Server JSF engine determines if the SUN RI or Apache MyFaces is used from the application server run time. After the JSF engine determines the implementation that 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 the web.xml file.

If you want to use a third party JSF implementation that is not shipped with the product, leave the configuration set to MyFaces, add the third party listener to the web.xml file that is required 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 tasks
Configuring JavaServer Faces implementation
Managing JavaServer Faces implementations using wsadmin scripting
Task overview: Developing and deploying web applications
Developing web applications
Configuring JSF engine parameters
Related reference
JSF engine configuration parameters
Concept topic Concept topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 3:08:41 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-zos&topic=cwebjavaserverfaces
File name: cweb_javaserver_faces.html