Updating Faces runtime resources in a Web project

The JavaServer Faces runtime resources that originally shipped in WebSphere® Studio Application Developer V5.1.x have been updated for Rational® Application Developer V6.0.1. If you want to continue development on Web projects that were created with this previous product version, it is recommended that you update the Faces runtime resources to the latest levels.

In Rational Application Developer V6.0.1, the Faces runtime resource updates happen automatically when a Web project is imported or a workspace is opened that contains out-of-date resources. After importing a Web project or opening a workspace from WebSphere Studio Application Developer V5.1.x to Rational Application Developer V6.0.1, you will be prompted to update the Faces runtime resources to the latest levels.

Automatically updating runtime resources

To update the Faces runtime resources automatically for a Web project:
  1. Import a Web project (or a workspace) containing Faces content from WebSphere Studio Application Developer V5.1.x. The Project Migration window opens.
    Note: If the Project Migration window does not open, your automatic build preference setting is probably disabled. In Project Explorer, right-click your Web project and select Build > Project; the process of rebuilding a project opens the Project Migration window.
  2. If you have other Web projects with Faces content in your workspace, check Apply this choice to any other projects that need to be upgraded and all your Web projects will be updated.
  3. Click one of the following:
    • Yes to complete the update automatically.
    • Later to defer the update. To update runtime resources automatically after selecting Later, you have to close and reopen the Web project or restart the workbench before rebuilding your Web project. If you have disabled automatic builds, right-click your Web project and select Build Project.
    • Never to keep your runtime resources back-level. If you choose Never and intentionally stay with the back-level runtime resources, you will not be prompted again to update them. In the future, you will need to update the runtime resources manually if you require them.
Note: If you created Faces JSPs that contained Faces Client components, you must separately update the Faces Client components runtime resources to the latest levels. Refer to Updating Faces Client runtime resources in a Web project.

Manually updating runtime resources

To update the Faces runtime resources manually for a Web project:
  1. Import your existing Web project with Faces content into a Rational Application Developer V6.0.1 workspace.
  2. Create a new Web project (or, if you are working with EGL, create a new EGL Web project) named JSF601. You will use this project only as a source for the latest runtime resources; it can be deleted after the update is complete.
  3. In the Project Explorer, right-click on the JSF601 project and select Properties from the menu.
  4. Click Web Project Features and select Add Faces Base Components and Add Faces Client Framework, then click OK.
  5. If you are working with EGL, create a JSF page file as follows:
    1. Right-click the WebContent folder of your new EGL Web project.
    2. Select New > Other > Faces JSP File.
    The eglintdebug.jar and eglintdebugsupport.jar files are added to your project.
  6. For each existing Faces project that you want to update, do the following:
    1. In Project Explorer, expand an existing project to show the files in the WebContent/WEB-INF/lib/ folder. Locate and delete any of the following JAR files in this directory:
      • eglintdebug.jar (EGL only)
      • eglintdebugsupport.jar (EGL only)
      • fda.jar (EGL only)
      • fdaj.jar (EGL only)
      • jsf-api.jar
      • jsf-ibm.jar
      • jsf-impl.jar
      • odc-jsf.jar
    2. Locate and open the file WebContent/WEB-INF/faces-config.xml. Add the following elements into this configuration file if they are not already present:
      	<lifecycle>
      		<phase-listener>com.ibm.faces.webapp.ValueResourcePhaseListener</phase-listener>
      	</lifecycle>
      	
      	<application>
      		<variable-resolver>com.ibm.faces.databind.SelectItemsVarResolver</variable-resolver>
      		<property-resolver>com.ibm.faces.databind.SelectItemsPropResolver</property-resolver>
      	</application>
    3. For any JAR files that you deleted, copy the JAR file of the same name from the WebContent/WEB-INF/lib directory of the JSF601 project and paste it into your original project in the same location. Some configurations will not require all of these JAR files to be present in the project; do not copy a particular JAR file if it was not in the original project.
    4. Open the web.xml deployment descriptor in the original project and add the following to the configuration:
      	<context-param>
      		<param-name>com.ibm.ws.jsf.JSP_UPDATE_CHECK</param-name>
      		<param-value>true</param-value>
      	</context-param>
      	<context-param>
      		<param-name>com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP</param-name>
      		<param-value>true</param-value>
      	</context-param>
    5. If your original project used WebSphere Data Objects (WDO) for any data access, do the following additional steps:
      1. In your original project, click File > New > Faces JSP File to create a new temporary Faces JSP file.
      2. Drag a relational record list component from the Data drawer on the palette to the page.
      3. Pick any connection and data source and click Finish. The data selected is not important. This process will generate any necessary configuration to continue using WDO in this project.
      4. Delete the temporary JSP file.
    6. If you are working with EGL, right click on the name of each EGL Web project and click Generate; then, if you are not building the projects automatically, click Project > Build All.
  7. Delete the JSF601 Web project.
Related concepts
Compatibility with WebSphere Studio V5.1.x
Related tasks
Updating Faces runtime resources for Web projects from Rational Application Developer V6.0
Updating Faces Client runtime resources in a Web project
Updating Faces runtime resources in a portlet project
Related reference
Debugger changes in V6.0
WDO to SDO migration
EGL reserved words in V6.0
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.