Migrating Faces resources in a portlet project
The JavaServer Faces support that originally shipped in WebSphere Studio Application Developer V5.1.2 has been updated for Rational Application Developer V6.0. If you want to continue developing in V6.0 portlet projects that were created with Portal Toolkit 5.0.2.2 on WebSphere Studio Application Developer V5.1.2, it is recommended that you upgrade the Faces project runtime resources to the latest levels.
Note: If you created JavaServer Pages (JSPs) that contained Faces Client Components, separately migrate the Faces Client Components runtime resources to the latest levels. Refer to Migrating JavaServer Faces resources with Faces Client Components.
If you create or edit JSPs in a portlet project that was migrated from Portal Toolkit 5.0.2.2 on WebSphere Studio Application Developer V5.1.2, you will be prompted to migrate the portlet project runtime resources to the latest levels. Click OK to complete the migration.
Note: If you respond No to the initial migration prompt and intentionally stay with the back-level JAR files, you will not be prompted again. You will need to migrate the portlet project resources manually if you require it in the future, as follows:
- Import your existing portlet project with Faces content into a Rational Application Developer V6.0 workspace.
- Create a new portlet project named JSFP60 with the Faces portlet option selected in the second page. You will use this project only as a source for the latest runtime artifacts. It can be deleted after migration is complete.
- In the Project Explorer, right-click on the project JSFP60 and select Properties from the menu. Switch to the tab for Web Project Features and select Add Faces Client Framework for Portlet Project.
- For each existing Faces project that you want to upgrade, do the following:
- Expand the original project in the Project Explorer to show the files in the WebContent/WEB-INF/lib/ folder. Locate and delete any of the following JAR files in this directory:
- jsf-api.jar
- jsf-ibm.jar
- jsf-impl.jar
- jsf-portlet.jar
- odc-jsf.jar
- 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> <variable-resolver>com.ibm.faces.application.WPPortletVariableResolver</variable-resolver> <property-resolver>com.ibm.faces.databind.SelectItemsPropResolver</property-resolver> </application>Note: If your portlet project is using the JSR 168 API, specify com.ibm.faces.application.PortletVariableResolver instead of com.ibm.faces.application.WPPortletVariableResolver.
- For any JAR files that you deleted, copy the JAR file of the same name from the WebContent/WEB-INF/lib directory of the JSFP60 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 them if the original project did not have a particular JAR file.
- If your portlet project uses the IBM portlet API or person link component, copy the jsf-portlet-wp.jar file into your original project.
- If you copy the file odc-jsf.jar, copy the file odc-jsf-portlet.jar as well.
Following these steps will bring an older portlet project up to the latest levels of Faces functionality in Rational Application Developer V6.0.
Parent topic
Migrating to the portal tools in Rational Application Developer V6.0
Related tasks
Migrating JavaServer Faces resources in a Web project
Migrating from WebSphere Studio V5.1, 5.1.1, or 5.1.2
Migrating JavaServer Faces resources with Faces Client Components
Migrating to the portal tools in Rational Application Developer V6.0
Migrating WebSphere Portal V4.2 portlets to V5.x