Steps to add any new JSF implementation or version to WildFly

Version 15

    JSF 1.2 support was removed from WildFly, so we will use JSF 1.2 as an example. 

     

    If you need to run a Seam 2 application on WildFly you will need to add JSF 1.2 back into each WildFly instance.  You do this using WildFly's Multi-JSF feature.

     

    Here are the exact steps you need to follow.  These same steps apply to any JSF implementation you want to add.

    1. Download the source for your target WildFly release. Any release from 8.0.0.Beta1 onward will work.
    2. cd <WILDFLY_SOURCE_ROOT>  and run the "build" script.
    3. cd <WILDFLY_SOURCE_ROOT>/jsf/multi-jsf-installer
    4. mvn -Djsf-version=1.2_15 -Pmojarra-1.2 clean assembly:single
    5. The final artifact in the target directory will be called install-mojarra-1.2_15.zip.  Rename it to install-mojarra-1.2_15.cli.
    6. Start WildFly
    7. cd to <JBOSS_HOME>/bin for the running server where you want to install the new JSF.
    8. Start the Command Line Interface and invoke this command then restart WildFly.

    [standalone@localhost:9999 /] deploy <local path to archive>/install-mojarra-1.2_15.cli

     

     

    If you want the default JSF implementation to be 1.2_15, invoke this command then restart WildFly.

    [standalone@localhost:9999 /]/subsystem=jsf/:write-attribute(name=default-jsf-impl-slot,value=mojarra-1.2_15)

     

    If you do not want JSF 1.2_15 to be the default implementation, add this to your web.xml in the JSF 1.2 application

    <context-param>

       <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>

       <param-value>mojarra-1.2_15</param-value>

    </context-param>

     

    Notes for other JSF versions and Implementations

    The steps above will work for other JSF versions and implementations as long as the JSF spec version is 1.2 or above.  The only major difference is in step 4 where you supply parameters for the maven-based tool.  The -Djsf-version value corresponds to a version value in Maven Central.  The profile, -P value can be myfaces, mojarra-1.2, or mojarra-2.x.


    Attachment

    The attachment below is a Maven project that creates a simple JSF 1.2 Facelets application that you can use to test the JSF 1.2 integration.