6 Replies Latest reply on Mar 9, 2012 9:43 PM by kalvish21

    Richfaces 4.0 latest download is not rendering jsf components.

    binoz

      I want to try out Richfaces 4.0. I tried to create an Hello World example.

      Included These Files in project.

      1.1)  richfaces-core-api-4.0.0.20101004-M3.jar

      1.2)  richfaces-core-impl-4.0.0.20101004-M3.jar

      1.3)  richfaces-components-api-4.0.0.20101004-M3.jar

      1.4)  richfaces-components-ui-4.0.0.20101004-M3.jar

      1.5)  sac-1.3, cssparser-0.9.5 - required for components CSS work

      1.6)  google-guava-r06 - core runtime dependency.

       

      Using JDK 1.6 and Tomcat 6.0

      None of the JSF tags is being rendered. where as HTML tags are being rendered.

       

      Please advise.

       

       

      -Bino

      1.1)  richfaces-core-api-4.0.0.20101004-M3.jar
      1.2)  richfaces-core-impl-4.0.0.20101004-M3.jar
      1.3)  richfaces-components-api-4.0.0.20101004-M3.jar
      1.4)  richfaces-components-ui-4.0.0.20101004-M3.jar
      1.5)  sac-1.3, cssparser-0.9.5 - required for components CSS work
      1.6)  google-guava-r06 - core runtime dependency.

        • 1. Re: Richfaces 4.0 latest download is not rendering jsf components.
          ilya40umov

          1) Could you post your web.xml and faces-config.xml files. I guess something is wrong with them.

          2) If you downloaded RF 4.0 M3 you should have a show case application inside its package. Could you try to compare your web.xml/faces-config.xml and configs provided it the snow case application?

          • 2. Re: Richfaces 4.0 latest download is not rendering jsf components.
            ilya40umov

            P.S. You should have JSF 2.0 implementation in your classpath. So it should be inside your war file because Tomcat doesn't have a built-in implementation. You can also try the same with Glassfish 3.0.1 because I'm sure that it has JSF 2.0 inside. (I haven't tried JSF 2.0 on Jboss 6.0 yet)

            • 3. Richfaces 4.0 latest download is not rendering jsf components.
              binoz

              I tried in Glassfish No Luck.

              I am posting my web.xml and faces-Config.xml

              <?xml version="1.0" encoding="UTF-8"?>

              <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

               

                <welcome-file-list>

                  <welcome-file>index.xhtml</welcome-file>

                 

                </welcome-file-list>

               

               

                        <context-param>

                                  <param-name>org.richfaces.skin</param-name>

                                  <param-value>#{skinBean.skin}</param-value>

                        </context-param>

               

               

                        <context-param>

                                  <param-name>org.richfaces.enableControlSkinning</param-name>

                                  <param-value>#{skinBean.enableElementsSkinning}</param-value>

                        </context-param>

               

               

                        <context-param>

                                  <param-name>org.richfaces.enableControlSkinningClasses</param-name>

                                  <param-value>#{skinBean.enableClassesSkinning}</param-value>

                        </context-param>

               

               

                        <context-param>

                                  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

                                  <param-value>server</param-value>

                        </context-param>

               

               

                        <context-param>

                                  <param-name>javax.faces.PROJECT_STAGE</param-name>

                                  <param-value>Development</param-value>

                        </context-param>

               

               

                <servlet>

                  <servlet-name>Faces Servlet</servlet-name>

                  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

                  <load-on-startup>1</load-on-startup>

                </servlet>

                <servlet-mapping>

                  <servlet-name>Faces Servlet</servlet-name>

                  <url-pattern>*.jsf</url-pattern>

                </servlet-mapping>

                <servlet-mapping>

                  <servlet-name>Faces Servlet</servlet-name>

                  <url-pattern>/faces/*</url-pattern>

                </servlet-mapping>

              </web-app>

               

              Faces-Config.xml, This file is empty.

               

              <?xml version='1.0' encoding='UTF-8'?>

               

               

              <!-- =========== FULL CONFIGURATION FILE ================================== -->

               

               

              <faces-config version="2.0"

                  xmlns="http://java.sun.com/xml/ns/javaee"

                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">

               

               

               

               

              </faces-config>

              • 4. Richfaces 4.0 latest download is not rendering jsf components.
                ilya40umov

                What URL do you enter in your browser?

                 

                I guess that this is not a correct definition of welcome pages:

                <welcome-file-list>

                    <welcome-file>index.xhtml</welcome-file>

                </welcome-file-list>

                I usually use the following form:

                <welcome-file-list>

                    <welcome-file>default.jsp</welcome-file>

                    <welcome-file>index.jsp</welcome-file>

                </welcome-file-list>

                 

                where index.jsp contains sendRedirect on my jsf page.

                • 5. Richfaces 4.0 latest download is not rendering jsf components.
                  binoz

                  You are right. The problem was with welcome file.

                  I changed index.xhtml to index.jsf in  web.xml.

                  I am OK now.

                   

                  Thanks.

                  -Bino

                  • 6. Re: Richfaces 4.0 latest download is not rendering jsf components.
                    kalvish21

                    Sorry to re open an issue from so long ago. But i'm having the exact same problem and the solution above didn't work. Here is my web.xml file:

                    Can somebody please advise?

                     

                     

                    <?xml version="1.0" encoding="UTF-8"?>

                    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

                        <context-param>

                            <param-name>javax.faces.PROJECT_STAGE</param-name>

                            <param-value>Development</param-value>

                        </context-param>

                        <servlet>

                            <servlet-name>Faces Servlet</servlet-name>

                            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

                            <load-on-startup>1</load-on-startup>

                        </servlet>

                        <servlet-mapping>

                            <servlet-name>Faces Servlet</servlet-name>

                            <url-pattern>/faces/*</url-pattern>

                        </servlet-mapping>

                        <session-config>

                            <session-timeout>

                                30

                            </session-timeout>

                        </session-config>

                        <welcome-file-list>

                        <welcome-file>index.jsf</welcome-file>

                    </welcome-file-list>

                    </web-app>