JSF 2 specification deprecates JSP as a view definition language. And all the new components and most of the features do not works for JSP VDL in JSF 2 itself. So RichFaces 4 decided to drop that support starting from the first 4.0.0.Final version. So you have to use JSF 2 Facelets VDL.
Seam 2 is not compatible with JSF 2. So if you evaluating RichFaces 4 and planning to estimate/review project migration to RichFaces 4 you should consider migration to Weld/Seam 3 also.
Web Application Descriptor
- RichFaces Filter not needed anymore as RichFaces 4 uses JSF 2 System Events for configuration and requests handling.
- remove org.ajax4jsf.VIEW_HANDLERS context parameter. it was needed to configure facelets view handler for JSF 1.2 only.
- Check the next table to learn about context-parameters changes:
|SKIN||skin||DEFAULT||default application skin|
|BASE_SKIN||baseSkin||-||base skin for current skin|
|CONTROL_SKINNING||enableControlSkinning||true||enables stylesheets with standard skinning classes.|
|CONTROL_SKINNING_CLASSES||enableControlSkinningClasses||false||enables stylesheets with predefined skinning classes for explicit usage on the component and containers definitions.|
|CONTROL_SKINNING_LEVEL||-||Not going to be migrated becase old browsers support (IE 6, Safary 2..) dropped|
|LoadScriptStrategy||resourceOptimization.enabled||false||The Resource Loading Strategies has been re-introduced as Resource Optimization feature|
|LoadStyleStrategy||resourceOptimization.enabled||false||The Resource Loading Strategies has been re-introduced as Resource Optimization feature|
|COMPRESS_SCRIPT||-||resource compression can be enabled using Resource Optimization feature|
|COMPRESS_STYLE||-||resource compression can be enabled using Resource Optimization feature|
- At first declare your faces-configs as JSF 2 faces-config files by changing its version <faces-config xmlns="http://java.sun.com/xml/ns/javaee" version="2.0">
- Remove facelets view handler definition as it needed only to configure facelets in JSF 1.2
The namespace and library inclusions are the same as those for previous versions of RichFaces.
The RichFaces namespaces need to be declared in the project's XHTML pages.
<ui:composition xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> ... </ui:composition>