3 Replies Latest reply: Jan 23, 2012 12:54 AM by Steve Button-Oracle RSS

    jsf 1.2 on weblogic 12c

    519798
      Hi,
      I am getting
      weblogic.servlet.jsp.CompilationException: admCountryIndicatorPageType.jsp:8:2: The method setJspId(String) is undefined for the type ViewTag
      <f:view>
      ----
      when I try to deploy jsf 1.2 application. I installed two libraries jsf-myfaces 1.1.7 and jstl 1.1.2 and reference them in my application's weblogic.xml.

      I tried to compile my jsps with the command line like this

      java -classpath ../Middleware/wlserver_12.1/server/lib/weblogic.jar weblogic.appc -verbose -library jsf-myfaces-1
      .1.7.war,jstl-1.1.2.war mwsadmin.war. This worked just fine.

      What am I missing to tell the appc process to use installed libraried to compile jsps?

      Thanks,

      Mike
        • 1. Re: jsf 1.2 on weblogic 12c
          Steve Button-Oracle
          You need to deploy the JSF 1.2 shared library that we provide (jsf-1.2.war) and then reference that in your weblogic-application.xml (or weblogic.xml).

          See the documentation here: http://docs.oracle.com/cd/E24329_01/web.1211/e21049/configurejsfandjtsl.htm#i163099

          Worth noting this important piece of information:
          In this release, the weblogic.xml file in jsf-1.2.war configures a filtering classloader for your application's JSF classes and resources.
          Which basically means that we have provided a pre-configured filtering classloader definition so that the server will load classes from the specified packages from libraries supplied or referenced by the application. Without this, you'll always get the JSF 2.x implementation that is now provided on the direct WLS classpath (a change in WLS 12c to make using JSF easier).

          Is there a reason you're using that older "jsf-myfaces 1.1.7" library? This won't have the filtering classloader definition. If you want to use that, then in addition to making the library reference to it, you'll also need to add a filtering classloader defininition. Take a look at the weblogic.xml file inside the jsf-1.2.war and copy the <prefer-application-packages> stanzas to your own configuration file.
          <prefer-application-packages>
              <package-name>javax.faces.*</package-name>
              <package-name>com.sun.faces.*</package-name>
             <package-name>com.bea.faces.*</package-name>
          </prefer-application-packages>
          
          <prefer-application-resources>
              <resource-name>javax.faces.*</resource-name>
              <resource-name>com.sun.faces.*</resource-name>
              <resource-name>com.bea.faces.*</resource-name>
              <resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>
          </prefer-application-resources>
          -steve-
          • 2. Re: jsf 1.2 on weblogic 12c
            519798
            Thanks, Steve!
            installing jsf-12.war did not work, but changing the weblogic.xml helped.
            • 3. Re: jsf 1.2 on weblogic 12c
              Steve Button-Oracle
              Thanks for the reply! Glad it's working for you. The jsf-1.2.war approach should work, I'll need to look into this.

              -steve-