2 Replies Latest reply on Jun 16, 2011 12:57 PM by ssilvert

    jsf application and classpath

    lysy78

      Hello,

       

      This is for Jboss 6.

       

      I have a jsf application, with bundled jsf implementation. It seems to work fine, application uses bundled jsf implementation.

      At least Jboss logger tells that:

       

      [config] Initializing Mojarra 2.1.1 (FCS 20110408) for context '/jsf2.0'

       

      But in JSF Guide for Jboss I found, that parameter  org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL should be set to true in order to tell JSF Deployer, that bundled implementation should be used.

       

      So I bielieve, that without setting this parameter to true, both jsf implementations are added to application classpath:

      - bundled

      - provided by JSF Deployer

       

      I just would like to check that, but I realized that I don't know how to check/print application classpath.

      Does anyone know how to do this?

       

      Thanks in advance

      Hubert

        • 1. Re: jsf application and classpath
          alesj

          http://jsfunit.blogspot.com/2010/12/jsf-on-jboss-as6-final.html

           

          Trace log for org.jboss.classloading should print out full classpath.

          • 2. Re: jsf application and classpath
            ssilvert

            Yes, if you are bundling a JSF implementation with your WAR then you do indeed need to set org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL=true.  Otherwise, both your impl and the default JSF impl will end up in the classpath.

             

            Note that when you bundle you are on your own to hook up integration points like Bean Validation and JEE5 annotations.  It's better if you set up a custom JSF configuration and do something like this:

             

            <context-param>
                <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>   
                <param-value>MyPerfectJSFConfig</param-value>
            </context-param>
            

             

            See the JSF on AS6 documentation for details.

             

            Stan