4 Replies Latest reply on Aug 14, 2006 1:49 PM by dwallin2

    Problems Deploying JSF in Jboss (It works fine with Tomcat)

    dwallin2

      Hello,

      I am trying to deploy a JSF Project in JBoss, but for some reason it does not work. The same project that I am trying to deploy in JBoss has no problems working in Tomcat. I figure this is because of the jar files i have in my project / jboss lib. It appears that you cannot use the same lib files as you would if you were deploying the project with Tomcat.

      My problem is that I cannot find anywhere, that gives accurate or any documentation at all about what jar files I will need in my lib folders, and what files I will need to get rid of. It would be great help if someone could please explain on here, what I need to do, or give me a link that gives accurate directions. It would be much appreciated.

      Thanks Alot

        • 1. Re: Problems Deploying JSF in Jboss (It works fine with Tomc
          peterj

          Could you be a little more specific about what you mean by "it does not work." Is it that when you deploy the application, you get errors? Or there are no errors, but when you attempt to acces a web page you get errors or a corrupt page? If you are getting errors, please post them.

          Also, do you have the JSF jars in your war file. In JBoss 4.0.4 (you never mentioned which version of JBoss you are using), the MyFaces jars are already provided, so I don't think you need tthem in your war file.

          • 2. Re: Problems Deploying JSF in Jboss (It works fine with Tomc
            dwallin2

            Greetings Peter,

            I am using Jboss 4.0.4, and I placed my .war file in server/default/deploy.
            After reading your reply, I then went on to delete all of the jar files from my project lib. I started the JBoss server, and put in the address http://localhost:8080/Forms.war

            Jboss is not able to see the project, I am getting the error...
            description The requested resource (/Forms.war) is not available.

            I am not sure if there is something more I need to add, or if I'm not starting JBoss correctly. Please get back to me

            Thanks for the reply

            • 3. Re: Problems Deploying JSF in Jboss (It works fine with Tomc
              peterj

              Assuming your war file is named Forms.war, the URL should be: http://localhost:8080/Forms

              • 4. Re: Problems Deploying JSF in Jboss (It works fine with Tomc
                dwallin2

                Thank you Peter for your help, I was able to figure it out. The problem was that I had not updated the listener in my project web xml.

                After changing it to

                <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


                Everything Came out fine :)

                So for anyone else who encounters the same problem in the future, be sure to delete the jar files from your project lib folder, since Jboss already provides them, and change your project web.xml listener to the one posted above.

                Tip*