JBoss JSF Richfaces

From MPDLMediaWiki
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.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: Following instructions on: [1]

JSF libraries (jsf-api.jar & jsf-impl.jar, jboss-faces.jar and jboss-mc-int-servlet.jar from JBoss 6) must be included in WEB-INF/lib directory of the war file. Additionally, the following lines 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>
<context-param>
  <param-name>com.sun.faces.injectionProvider</param-name>
  <param-value>org.jboss.web.jsf.integration.injection.JBossInjectionProvider</param-value>
</context-param>
  • JBoss still logs version 1.2 at startup, but anyway JSF 2 seems to run
INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/digi_lifecycle'


    • 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 here 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 with both configs (with&without modifications of JBoss).
  • Another Problem: 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 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:
  • Mojarra 2.0.2 or 2.0.3. should be used. With 2.0.4, an view-handler error occurs.

<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>

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.
  • Richfaces 4.0 Release Plan [3] says that final version will be available March 2011
  • 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
  • However: No error messages occur here if facelets 1.1.15 is used

Richfaces 4[edit]

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