jsf-2upgradewarweblogic-10.xjava-ee-5

Upgrade WebLogic 10.3.0 to JSF 2 via webapp-provided JAR


I have a Java EE 5 Web Application running on WebLogic 10.3.0. I want to use JSF 2.x, but WebLogic 10.x only supports JSF 1.2. So I did the following in order to use JSF 2.x instead.

  1. I deployed a WAR cointaining those JARs:

    • wls.jsf.di.jar
    • glassfish.jstl_1.2.0.1.jar
    • javax.jsf_1.0.0.0_2-0.jar (jsf 2.0)
    • glassfish.jsf_1.0.0.0_2-0-4.jar

  2. I added the following JARs to build path purely for compilation:

    • javax.faces-2.1.26.jar
    • jstl-1.2.jar

  3. Created a Servlet 2.5 compatible web.xml and a weblogic.xml (1.0).

  4. Included this in weblogic.xml:

    <library-ref>
        <library-name>jsf</library-name>
        <specification-version>2.0</specification-version>
        <implementation-version>1.0.0.0_2-0-2</implementation-version>
        <exact-match>false</exact-match>
    </library-ref>
    
    <container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    
  5. For EL 2.2-like method arguments support in EL 2.1, I added this JAR:

    • jboss-el-2.0.0.GA.jar

  6. And placed this in web.xml:

    <context-param>
        <param-name>com.sun.faces.injectionProvider</param-name>
        <param-value>
            com.sun.faces.vendor.WebContainerInjectionProvider
        </param-value>
    </context-param>
    

After all this changes WebLogic Console is still saying the following:

Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context

As you can see, it is still using JSF 1.2. What else can i do to fully use JSF 2?


Solution

  • Well, after doing some tests i was really using JSF 2! So yes, that is enough to make Weblogic 10.3.0 work with JSF 2. I don't remember if i got rid of the "Initializing JSF 1.2" message tho, i recommend to just ignore it