JBoss JSF Richfaces

From MPDLMediaWiki
Revision as of 16:11, 21 February 2011 by Haarlaender (talk | contribs)
Jump to navigation Jump to search

JBoss 4.2.2[edit]

JSF 1.2[edit]

  • No problems as JBoss 4.2.x comes with built in JSF 1.2 libraries (Mojarra)

Richfaces 3.3.3[edit]

Required Dependencies:

<dependency>
  <groupId>org.richfaces.ui</groupId>
  <artifactId>richfaces-ui</artifactId>
  <version>3.3.3.Final</version>
</dependency>

<dependency>
  <groupId>org.richfaces.framework</groupId>
  <artifactId>richfaces-impl</artifactId>
  <version>3.3.3.Final</version>
</dependency>
  • If Facelets are required, use version 1.15 for compatibility with RichFaces 3.3.3
<dependency>
  <groupId>com.sun.facelets</groupId>
  <artifactId>jsf-facelets</artifactId>
  <version>1.1.15</version>
</dependency>	


JSF 2.0[edit]

  • not tested, presumably same as with JBoss 5.1


JBoss 5.1[edit]

JSF 1.2[edit]

  • No problems as JBoss 5.1 comes with built in JSF 1.2 libraries (Mojarra)
  • See #JBoss 4.2.2

JSF 2.0[edit]

  • JBoss 5.1 comes with built in JSF 1.2 libraries
  • Two options for update to JSF 2.0:
    • Without modification of JBoss libraries: JSF libraries (jsf-api.jar & jsf-impl. jar) must be included in WEB-INF/lib directory of the war file. Additionally, the following line must be set in web.xml:
<context-param>
 <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
 <param-value>true</param-value>
</context-param>

!!!!Beware: The name of the JSF jar files must be exactly the same as in the JBoss deploy directory. This leads to a problem with Maven, which automatically adds the version number to the files.

  • This blog also suggests to replace jboss-faces.jar and add other lines to web.xml: [1]
  • Doesn't work for me, strange ClassNotFoundExceptions occur
    • With modification of JBoss: Replace the two JSF libraries (jsf-api.jar & jsf-impl. jar) in /server/default/deploy/jbossweb.sar/jsf-libs with the ones of version 2. Beware that they must have the same filename. Leave jboss-faces.jar as it is.
  • This page suggests to also replace the jboss-faces.jar: [2] - Doesn't work for me strange ClassNotFoundExceptions occur
  • New Expression Language functionality (paramters in method calls etc.)cannot be used!

Richfaces 3.3.3[edit]

  • Richfaces 3.3.3.Final is partly JSF 2 compatible
  • Seperate richfaces-impl JSF 2 library is available, ui library stays the same as for JSF 1.2:

<dependency>

  <groupId>org.richfaces.ui</groupId>
  <artifactId>richfaces-ui</artifactId>
  <version>3.3.3.Final</version>
</dependency>

<dependency>
  <groupId>org.richfaces.framework</groupId>
  <artifactId>richfaces-impl-jsf2</artifactId>
  <version>3.3.3.Final</version>
</dependency>
  • Richfaces 3.3.3.Final is not compatible with Facelets 2, which is included in JSF 2 libraries. Thus, it has to be deactivated in web.xml:
<context-param>
  <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
  <param-value>true</param-value>
</context-param>
  • If Facelets is required, version 1.1.15 has to be used..
<dependency>
  <groupId>com.sun.facelets</groupId>
  <artifactId>jsf-facelets</artifactId>
  <version>1.1.15</version>
</dependency>	
  • ... and must be explicitely activated in faces-config:
<application>    
  <view-handler>
   com.sun.facelets.FaceletViewHandler
  </view-handler>
</application>


  • Problems: Errors like the following occur, but they do not seem to bother the application
SEVERE [compiler] Error Loading Library: vfszip:/C:/jboss/jboss-5.1.0.GA.JSF2/server/default/deploy/jbossweb.sar/jsf-libs/jsf-impl.jar/com/sun/faces/metadata/taglib/composite.taglib.xml


Richfaces 4.0[edit]

  • Richfaces 4.0 is fully compatible with JSF 2
  • Currently, only milestone release is available, which still seems to be quite incomplete.
  • Many changes in names from version 3.3.3, no ready documentation yet.


JBoss 6.0[edit]

JSF 1.2[edit]

  • Not of interest

JSF 2[edit]

  • JBoss 6 comes with built-in JSF 2 libraries
  • Full support of new Expression Language and Java EE 6 specification

Richfaces 3.3.3[edit]

  • Same problems with facelets compatibility as described for #JBoss 5.1


Richfaces 4[edit]

  • Works fine, but currently no final version provided (see #JBoss 5.1)