Creating a custom JSF deployer in JBoss AS 6.X

Submitted by Jochus on Sun, 30/12/2012 - 18:47 | Posted in: Java

JBoss AS 6.X gets shipped with Mojarra 2.0.3 (b5), but I wanted to do some testing with Mojarra 2.0.9. To be able to use this JSF implementation, you need to create a custom JSF deployer:

~ $ cd /Applications/jboss-6.1.0.Final/server/default/deployers/jsf.deployer/
/Applications/jboss-6.1.0.Final/server/default/deployers/jsf.deployer $ mkdir Mojarra-2.0.9
/Applications/jboss-6.1.0.Final/server/default/deployers/jsf.deployer $ cd Mojarra-2.0.9/
/Applications/jboss-6.1.0.Final/server/default/deployers/jsf.deployer/Mojarra-2.0.9 $ mkdir META-INF jsf-libs

In the META-INF folder, create the following file: web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="<a href=""&#10">"&#10</a>;   xmlns:xsi="<a href=""&#10">"&#10</a>;   xsi:schemaLocation="<a href=""></a> <a href=""&#10">"&#10</a>;   version="2.5">
   <!-- ======================== Introduction ============================== -->
   <!-- This document defines default values for the Mojarra-2.0 JSF config  -->
   <!--                                                                      -->
   <!-- WARNING:  Do not configure application-specific resources here!      -->
   <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->
   <!-- =========== Common Context Params ================================== -->
   <!-- Regular expression to determine if two different URLs actually point -->
   <!-- to the same jar file.  This keeps faces-config files from being      -->
   <!-- read twice.                                                          -->
   <!-- JBossInjectionProvider provides resource injection for managed beans. -->
   <!-- See JSF 1.2 spec section 5.4 for details.                             -->
   <!-- ================== Common filter Configuration ==================== -->
   <!-- ================== Common Listener Configuration ==================== -->
   <!-- Configures JSF 2.0 -->

In jsf-libs:

  • Copy the file jboss-faces.jar from the 2.0.3 folder
  • Download the JSF libraries from:
  • This should result in something as:
    /Applications/jboss-6.1.0.Final/server/default/deployers/jsf.deployer/Mojarra-2.0.9/jsf-libs $ ls -al
    total 4952
    drwxr-xr-x  5 jochen  staff      170 Nov  7 16:58 .
    drwxr-xr-x  4 jochen  staff      136 Nov  7 16:44 ..
    -rw-r--r--@ 1 jochen  staff     6148 Nov  7 16:58 .DS_Store
    -rw-r--r--@ 1 jochen  staff  2502592 Nov  7 16:45 javax.faces-2.0.9.jar
    -rw-rw-r--@ 1 jochen  staff    21804 Aug 16  2011 jboss-faces.jar

Open the file: /Applications/jboss-6.1.0.Final/server/default/deployers/jsf.deployer/META-INF/jsf-integration-deployer-jboss-beans.xml:

  • Extend the property jsfConfigurations:
        <property name="jsfConfigurations">
          <map keyClass="java.lang.String" valueClass="java.lang.String">
  • Add the following bean:
      <bean name="JSFUrlIntegrationDeployer-209" class="org.jboss.jsf.deployer.JSFUrlIntegrationDeployer">
        <property name="JSFConfigName">
        <property name="JSFImplManagementDeployer">
          <inject bean="JSFImplManagementDeployer"/>

Finally, to let your web application use the correct JSF deployer, make a reference in your WEB-INF/web.xml of your application (using the context-param: org.jboss.jbossfaces.JSF_CONFIG_NAME) :


Add new comment

The content of this field is kept private and will not be shown publicly.


  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <css>, <html5>, <java>, <javascript>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.