Wednesday, January 29, 2014

How to run JSF 1.2 Application in JBoss AS 7.1.1 Final

In one of my earlier post I have described how can we upgrade the JSF version. Yesterday, I was being asked that how can we downgrade the version. So I created a sample project to do this. It is true that many of you have applications developed in older version of Java Server Faces, JSF 1.2 and if you want to run those application in JBoss AS 7.1.1 maybe these post will help you.
JBoss AS 7.1.1 comes with the backward compatibility of JSF 1.2. The required jars can be found in the following path:
  • jsf-impl: <path_to_your_server>/modules/com/sun/jsf-impl/1.2
  • jsf-api: <path_to_your_server>/modules/javax/faces/api/1.2
But you need to inform the server that your application is a JSF 1.2 application. To do this you need to:
  • Declare your webapp version to Servlet 2.5. 
  • Define a context param which would tell JBoss to use JSF 1.2.
Here is my webapp declaration:
<web-app xmlns:xsi="" xmlns=""
 xsi:schemaLocation="" id="WebApp_ID" version="2.5"> 
And the context param is:
You don't need to place JSF 1.2 jars in your WEB-INF/lib. When you run the application if you see:
12:15:34,896 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-9) Initializing Mojarra (1.2_15.jbossorg-1-20111019-SNAPSHOT) for context '/your-app'
in your console you are good to go.


  1. This comment has been removed by the author.

  2. Hello, I'm trying to run my project(CRUD) with JSF 2.0.
    The list page presents the list of employees.
    However, I can't create a new Employee due to the exception bellow:

    20:09:19,328 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http-localhost- com.jcg.dao.EmployeeDao from [Module "com.sun.jsf-impl:main" from local module loader @b6be69 (roots: D:\jboss-as-7.1.1.Final\modules)]: java.lang.ClassNotFoundException: com.jcg.dao.EmployeeDao from [Module "com.sun.jsf-impl:main" from local module loader @b6be69 (roots: D:\jboss-as-7.1.1.Final\modules)]

    Could you please give me an ideao to resolve this issue ?.
    Thanks in advance.

  3. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Alfresco , kindly Contact MaxMunus
    MaxMunus Offer World Class Virtual Instructor led training on Alfresco. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 1,00,000 + trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email :
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website :