10 Replies Latest reply on Jun 28, 2010 5:00 AM by Ilya Shaikovsky

    Richfaces and Facelets

    Tom Struzik Newbie

      Hi --


      I've tried every just about every combination, but I can't get .xhtml files to render in my Richfaces environment.  Can someone please post working config (web.xml, faces-config.xml) files and what libraries you are using?  I am using the following libraries.  I am unable to use the ui:composition tags because of this. 



      I have attached my config files. 
        • 1. Re: Richfaces and Facelets
          Max Katz Newbie

          You don't have Facelets configured in faces-config.xml.




          You can also try this template that has RichFaces configured: http://mkblog.exadel.com/ria/richfaces-ria/the-easiest-way-to-start-with-richfaces/





          1 of 1 people found this helpful
          • 2. Re: Richfaces and Facelets
            Tom Struzik Newbie

            Thanks, Max.  When I substitute the *.xml files in your example for mine, if I try to call test.jsp I get the following: 


            HTTP Status 500 -

            type Exception report


            description The server encountered an internal error () that  prevented it from fulfilling this request.


            org.apache.jasper.JasperException: java.lang.RuntimeException: Cannot find FacesContext


            root cause

            java.lang.RuntimeException: Cannot find FacesContext


            note The full stack trace of the root cause is available in the  JBoss Web/2.1.3.GA logs.




            If I call it as test.jsf I get this:


            HTTP Status 404 - /CSMQ/test.jsf

            type Status report

            message /CSMQ/test.jsf

            description The requested resource (/CSMQ/test.jsf) is not  available.

            JBoss Web/2.1.3.GA



            Again, thanks for your help.

            • 3. Re: Richfaces and Facelets
              Ilya Shaikovsky Master

              you should use xhtml or jspx syntax to define facelets pages (check facelets docs)

              • 4. Re: Richfaces and Facelets
                Tom Struzik Newbie

                Thanks for the suggestions.  Max, I was able to get your example working, but on JBoss I'm getting this error:


                SEVERE [application] JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider' does not implement the InjectionProvider interface.



                I am trying to do is run some of the examples from the demo that include both RichFaces & Facelets (like the wizard) on JBoss 5.1.0.GA.


                Thanks again.

                • 5. Re: Richfaces and Facelets
                  Max Katz Newbie

                  The template is for Tomcat. I don't know if that's the cause of the problem but the template has JSF libraries and JBoss AS also has them. You need to remove them from the template.




                  • 6. Re: Richfaces and Facelets
                    Tom Struzik Newbie

                    It took a little digging, but this helped:




                    thanks again for your help.

                    • 7. Re: Richfaces and Facelets
                      Karl Krasnowsky Newbie

                      Hey Tom,

                      So was this all you did to get your JSF 2.0 project to  deploy under JBoss AS 5.1 ?


                      I've commented out the bits as suggested in the link you posted but continue to get deployment errors concerning what appear to be related issues to JSF.




                      • 8. Re: Richfaces and Facelets
                        Tom Struzik Newbie

                        one more question, Max:  if tried several different configurations but I can't seem to get both JSF pages and XHTML pages to be served simultaneously.  From what I've read this is possible, if not common.  Given your example, can you tell me what changes need to be made?  Or is this a limitation of JBoss 5.1.0?  thanks!

                        • 9. Re: Richfaces and Facelets
                          Tom Struzik Newbie

                          Hi Karl -- as I noted, I can't get JSF and Facelets to work on JBoss 5.1.0, but those changes I mentioned fixed the other problems I was having.

                          • 10. Re: Richfaces and Facelets
                            Ilya Shaikovsky Master

                            the problems with Jboss could be also caused for example by the fact that the AS contains JSF implementation,. So you should either remove lsf librarites from application or use parameters for jboss to use application bundled ones.