8 Replies Latest reply on Aug 13, 2013 9:54 AM by Stan Silvert

    JSF tld not found in Migrated app

    bes.comcom Newbie

      I'm currently migrating yet another legacy app to as7+

      This one uses richfaces 3 which I noticed uses jsf 1.2.

      So I've added the dependencies to my jboss-deployment-structure.xml.

      by adding the following to the dependencies in my WAR subdeployment: (I've tried this with and without excluding the 2.0 modules)

       

      <module name="com.sun.jsf-impl" slot="1.2"/>

      <module name="javax.faces.api" slot="1.2" />

       

       

       

      I'm getting the following error on first page load (we've all seen this):

       

      JBWEB004113: The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application

      Now normally that's just that the tlds aren't in the classpath.  However I've used the following steps to ensure they are in the classpath.

      I've added <imports><include path="*" /><imports> to the jsf-impl module.

      I've copied out the TLDs from the impl jar (packaged with as7) and put them in my /WEB-INF/lib, and I've added a litteral taglib callout to these in my web.xml

       

      NONE of these have had any effect on the error, it is exactly the same.

       

      I know this probably isn't enough information, but I'll reply to any questions in a thorough manner.

        • 1. Re: JSF tld not found in Migrated app
          Stan Silvert Master

          To use JSF 1.2 with AS7, you just need to add this to your web.xml

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

           

          For using JSF 1.2 with WildFly, see Design of WildFly Multi-JSF feature

           

          I've said this many times, but I'll say it again.  You should never need to use jboss-deployment-structure.xml to configure JSF.

           

          Stan

          • 2. Re: JSF tld not found in Migrated app
            bes.comcom Newbie

            Stan, part of the complication is that I'm trying to migrate a Richfaces3 app which isn't a full JSF implementation.

            When I added that context parameter to my web.xml it had zero effect on the outcome.

            When I had that in and removed the deployment xml module dependencies, I got a boatload of class not found exceptions.

            I may this migration over on wildfly and see how things go.

             

            I know you've put a lot of work into the multi-jsf feature, I'd like to try it, but for right now I just need to get these legacy apps migrated

            • 3. Re: JSF tld not found in Migrated app
              Stan Silvert Master

              RichFaces is not a JSF implementation at all.  RichFaces is a JSF component library.  So I'm not sure what you mean.

               

              I'm attaching a simple JSF 1.2 application that uses the AS7 JSF 1.2 implementation properly.  It uses the TLD that your application can't find.  Hopefully, you can look at this and compare to see how your application might be misconfigured.

               

              Stan

              • 4. Re: JSF tld not found in Migrated app
                bes.comcom Newbie

                Correct.

                I'm betting there are extra libraries loaded for this legacy app that must be conflicting with the proper loading of the JSF 1.2 impl that is deployed with the container.  I'll keep digging.

                Using an example app isn't all that helpful, because this is a legacy app that doesn't use maven, etc.

                 

                Thanks for the help, Stan

                • 5. Re: JSF tld not found in Migrated app
                  Stan Silvert Master

                  What does Maven have to do with it?  Are you just saying that you don't know how to build with Maven?

                  • 6. Re: JSF tld not found in Migrated app
                    bes.comcom Newbie

                    No, I'm saying maven is not in the migration path for this legacy app.

                    It was never set up with a maven like structure and the effort to do so is out of scope for the project.

                    • 7. Re: JSF tld not found in Migrated app
                      bes.comcom Newbie

                      How I know it is completely ignoring the directive set out in the web.xml

                       

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

                      Is that if I don't include the jsf modules as dependancies to the web sub-deployment.  I get a mess of ClassNotFoundException: javax.faces.webapp.UIComponentELTag errors

                      So it isn't even loading the jsf api module with the above directive, unless I manually declare it in the jboss-deployment-structure.xml

                      • 8. Re: JSF tld not found in Migrated app
                        Stan Silvert Master

                        bes.comcom wrote:

                         

                        No, I'm saying maven is not in the migration path for this legacy app.

                        It was never set up with a maven like structure and the effort to do so is out of scope for the project.

                        Just build the example app with Maven.  Then compare the resulting WAR with your own application.  The app I attached shows the proper way to bundle and configure a JSF 1.2 application for AS7.