Configuring third-party JavaServer Faces 2.3 implementations

Use the JavaServer Faces (JSF) Container 2.3 feature to allow Contexts and Dependency Injection (CDI) integration to work with a JSF provider that is bundled within an application.

Before you begin

Use this feature only if you want a JSF provider different from the built-in Liberty JSF provider. If you want to use the default JSF provider from Liberty, use the jsf-2.3 feature instead.

About this task

Use the Liberty JSF container to package any 2.3.X version of the MyFaces or Mojarra JSF implementation within an application and also use Liberty CDI integrations. To configure a Liberty server to run an application with JSF 2.3, enable the jsfContainer-2.3 feature and package the JSF API and implementation inside of your application.

  • You cannot use the jsfContainer-2.3 feature with other JSF features, such as jsf-2.3.
  • To use the JSF container, package the JSF API javax.faces classes and a JSF implementation inside of the application. The program does not support packaging the JSF API and implementation in a shared library.
  • The jsfContainer-2.3 feature is supported only for the JSF API and implementation that correspond to the 2.3 version of the JSF specification. The MANIFEST.MF of the JSF API and implementation must define a Specification-Version between version ranges [2.3,2.4).
  • For JSF @ManagedBeans with jsfContainer-2.3, the program does not support the injection of objects with @Resource or @EJB beans. Use the CDI @Named beans instead.


  1. Update the server.xml file to enable the jsfContainer-2.3 feature as it is displayed in the following example:
  2. Package the JSF API and implementation for the JSF provider that you want to use within your application. For example, a .war (Web Archive) application that uses a JSF container with Mojarra might display as it does in the following example:

    Alternatively, an application can package Apache MyFaces in the following locations within the app:

    /WEB-INF/lib/commons-beanutils-1.9.3.jar     # dependency of myfaces
    /WEB-INF/lib/commons-collections-3.2.2.jar   # dependency of myfaces
    /WEB-INF/lib/commons-digester-1.8.jar        # dependency of myfaces
    /WEB-INF/lib/commons-logging-1.1.1.jar       # dependency of myfaces
    /WEB-INF/lib/tomcat-websocket-api-7.0.78.jar # dependency of myfaces
    /WEB-INF/lib/persistence-2.1.jar             # dependency of myfaces when using @EJB


The JSF Container 2.3 feature is enabled and loads in the Liberty server at run time. The feature uses the JSF API and implementation that are packaged within the application.