5 Replies Latest reply on Feb 25, 2010 1:45 PM by dgolovin

    Cannot run a JSF project

    handro1104

      I am working with JBoss Developer Studio Version 2.1.1.GA.  When I create a new JSF project and add a XHTML file, I cannotspecify in the web.xml file how to run the application to display the page.  I have copied the web.xml from a seam project, but still it doesn't work.

       

      Your help will be greatly appreciated,

       

      Alejandro Barrero

        • 1. Re: Cannot run a JSF project
          akazakov
          How did you create the project? Did you use New JSF Project wizard?
          • 2. Re: Cannot run a JSF project
            handro1104

            Thank you Alexei.  I did use new JSF project.

            Jesus, I copied the project from http://www.ibm.com/developerworks/web/library/j-richfaces/ and it gave me the same error!!!

            • 3. Re: Cannot run a JSF project
              dgolovin
              How does your error look like?
              • 4. Re: Cannot run a JSF project
                handro1104

                The message in the web page is  The requested resource () is not available.

                I don't get anything in the Tomcat log.

                • 5. Re: Cannot run a JSF project
                  dgolovin

                  I've just verified this on JBDS 2.1.1.GA build.

                  My environment is:

                  1. OS - Linux Ubuntu 9.10

                  2. JVM - Open JDK 1.6

                  3. IDE - JBDS 2.1.1.GA

                  4. Server - Tomcat 6.0.20

                  5. WAR - downloaded from your link provided below

                   

                  What I did to verify:

                  1. Installed JBDS 2.1.1.GA

                  2. Created Tomcat server

                  3. Downloaded archive using URL provided below

                  4. Extracted WAR file from it into temporary directory

                  5. Imported it with default values through "Import" dialog available by "File/Import..." menu like it shown below

                  jsf-import.png

                  Left all suggested default values and press Finish button

                  jsf-import-params.png

                  6. Ran imported example through Run On Server "Run as->Run on Server"pop-up menu in Java Package Explorer

                  jsf-import-run-on-server.png

                  7. Got first page like this

                  jsf-started.png

                  What did you exactly do besides that?

                  Have you ever seen clean example started and working?

                  What is your web.xml and new xhtml page look like?

                   

                  If you are using web.xml from seam it should be references like .seam according to servlet mapping declaration


                  <servlet-mapping>
                     <servlet-name>Faces Servlet</servlet-name>
                     <url-pattern>*.seam</url-pattern>
                  </servlet-mapping>