10 Replies Latest reply on May 4, 2009 9:03 AM by meghiddo

    How do I add the richfaces library to eclipse? (experienced

      I made a post earlier but I don't think it is going to get any answers, there doesnt seem to be enough info to answer it and I dont know what else to add. So Im going to go from the beginning and make sure Im doing it all correctly.

      SO to add the library I go to the preferences window and go to web->JSF Tools->Libraries and the click on New
      I call it RichFaces, put the version supported to v1_2, add the 3 jars that I downloaded (api, impl and ui - 3.3.0.GA.jar) and leave "Is JSF Implementation" un checked.

      That all seems correct right?

      Then I create a new dynamic web project, change the config to JSf v_1.2 project. I makre sure the RichFaces component libarary is added in to the project from the third page and then hit finish.

      All that is correct so far right? Because I then follow the tutorial for the greeter project and I cannot get it working. There are no compile errors or warnings. When I try to open the site by going to http://localhost/greeter/index.jsf it tells me the resource is unavailable. I definitely added the project to the tomcat server and then restarted the server so that doesnt seem to be it. And I dont think it is a config problem with tomcat because I am able to open other projects that dont use richfaces without any trouble.

      Oh yes, and when I try to compile the project using eclipse's broswer it just takes me to the browser screen as if it is going to load but the screen just stays white and the status bar never really moves.

      And I did name my page index.jsp instead of index.jsf, but then in the web-xml file I changed the url pattern to *.jsp instead of *.jsf
      Although Im pretty sure that isnt the problem as Ive tried it the other way around as well.

      PLEASE HELP!!!
      Im running out of time lol

        • 1. Re: How do I add the richfaces library to eclipse? (experien

          the greeter tutorial says to "create a project and call it greeter"
          then import all the necessary libraries.

          what librares is it referring to? I dont think I am supposed to import the richfaces library at this poit, because the tutorial then goes on to tell you how to add those three jar files. So I am trying a new one without adding richfaces at this point,

          but what is meant by "necessary libraries"?
          I am just using the mojarra implementation, is that all that is needed, or am i needing to addd something else here?

          • 2. Re: How do I add the richfaces library to eclipse? (experien
            wolfgangknauf

            Hi,

            I think the "JSF library" feature is only for defining the JSF standard implementation, but not for libraries built upon JSF.

            So, you need two steps:
            1) create a JSF library in eclipse with the option "server supplies implementation" (JBoss contains Mojarra) and choose your JBoss server runtime. Here are two eclipse screenshots which will hopefully help (on a german page): http://www.informatik.fh-wiesbaden.de/~knauf/KomponentenArchitekturen2008/jsfbasics/index.html#project
            Beware to upgrade Eclipse/WebTools to 3.4.2, because in previous versions the classpath to the JSF libs was wrong.

            2) drop the Richfaces JARs in WEB-INF\lib (without any further configuration)

            This should do it

            Wolfgang

            • 3. Re: How do I add the richfaces library to eclipse? (experien

              I am obviously missing something here. I thought I could just download the richfaces binary zip file, and create a new library that had the richfaces components, and leave everything else as is.

              So I need to use JBoss as my target runtime? I have been using Apache Tomcat v6.0. I didn't even have the JBoss server downloaded, so I had to go ahead and do that. Got that done, and I was able to choose JBoss v5.0 for my target runtime. I then left it to server side implementation. I put those three jar files in the WEB-INF/lib file for the greeter project, refreshed the project amd restarted my servers (the JBoss and Tomcat server).

              I tried to open the project through both servers and still have the same problems. WHen I try to run it on the JBoss server I get
              HTTP Status 404 - /greeter/index.jsp

              --------------------------------------------------------------------------------

              type Status report

              message /greeter/index.jsp

              description The requested resource (/greeter/index.jsp) is not available.


              --------------------------------------------------------------------------------

              JBoss Web/2.1.2.GA


              and when I rn it on the tomcat server I get a slightly different version:

              HTTP Status 404 -

              --------------------------------------------------------------------------------

              type Status report

              message

              description The requested resource () is not available.


              --------------------------------------------------------------------------------

              Apache Tomcat/6.0.18



              either way, its not working for me!!!! what am I missing????

              I am losing it here, this is killing me

              • 4. Re: How do I add the richfaces library to eclipse? (experien

                maybe it has something to do with the default file structure for projects in eclipse? I have noticed that sometimes I will download source files for a project, and sometims I cannot open it when I try to import it into eclipse. WHen I look around in the folder I notice all the files that are supposed to be there, but they are all located in different folders, the file structure is completely different from the projects I have successfully built in eclipse.

                could that be part of it? Im just grasping at straws at this point

                • 5. Re: How do I add the richfaces library to eclipse? (experien

                  I am using eclipse 3.4.2 btw I just found out, does that mean I need to change anything?

                  • 6. Re: How do I add the richfaces library to eclipse? (experien

                    screw it I am using IceFaces lol

                    • 7. Re: How do I add the richfaces library to eclipse? (experien
                      khizz

                      which is better iceface or richfaces

                      • 8. Re: How do I add the richfaces library to eclipse? (experien

                        well icefaces gave me the same problem, but I have this problem fixed for richfaces at least.

                        first I had to manually add each JAR to my project. Then restart eclipse. Then start tomcat. However all the JARs still were not being exported to tomcat/wtpwebapps/project/WEB-INF/lib, so I ahd to then copy and paste the actual JARs into that folder. Then I restarted tomcat and the page showed up just fine. This works for now, but every time I make a change and want to see it at local host I have to go through this process. time consuming but better than that damn 404 error.

                        I liked IceFaces betetr honestly, but I seem to be having teh same issue, and have yet to figure out how to work around it

                        • 9. Re: How do I add the richfaces library to eclipse? (experien
                          wolfgangknauf

                          Hi,

                          you should have told us that you are using Tomcat ;-). As this is a JBoss forum, I thought that you would use a JBoss server.

                          Better ask your questions in the RichFaces forum: http://www.jboss.org/index.html?module=bb&op=viewforum&f=261

                          Best regards

                          Wolfgang

                          • 10. Re: How do I add the richfaces library to eclipse? (experien

                            Well I did try with JBoss as well as per your instructions but I still got similar issues.

                            Thanks for the tip though, I did not make the distinction