5 Replies Latest reply on Nov 22, 2011 10:07 AM by smoradi

    JBoss 7 + Richfaces 3.3.3 + blank page

    spiritfox26

      I'm trying to migrate to JBoss AS 7, but when the server started only show a blank page, if i put the source code of page the code not is traduced to html.

       

      Captura.PNG

       

      Thanks in advanced

       

      Regards

        • 1. Re: JBoss 7 + Richfaces 3.3.3 + blank page
          spiritfox26

          I need help, anyone have an idea what is happening?

           

          Thanks

           

          Regards

          • 2. Re: JBoss 7 + Richfaces 3.3.3 + blank page
            volothamp

            Usually it happens when something is wrong with the web.xml file.

             

            Although I assume you haven't changed it, could you please post it here?

            • 3. Re: JBoss 7 + Richfaces 3.3.3 + blank page
              spiritfox26

              No, i trying to migrate to JBoss AS 7 but i can't do it.

               

              Copy my web.xml (works fine in JBoss 5.1)

               

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

              <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"

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

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

               

               

                        <display-name>ITIL Gestion de Configuracion</display-name>

                        <description>ITE-ITIL</description>

               

               

                        <!-- Use Documents Saved as *.xhtml -->

                

                        <context-param>

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

                                  <param-value>.xhtml</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>com.sun.faces.enableRestoreView11Compatibility</param-name>

                      <param-value>true</param-value>

                        </context-param>

               

                        <context-param>

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

                                  <param-value>/WEB-INF/faces-managed-beans.xml, /WEB-INF/faces-navigation.xml</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>org.richfaces.queue.global.enabled</param-name>

                                  <param-value>true</param-value>

                        </context-param>

               

                        <context-param>

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

                                  <param-value>ALL</param-value>

                        </context-param>

               

                        <context-param>

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

                                  <param-value>ALL</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>

                                  <param-value>true</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>

                                  <param-value>true</param-value>

                        </context-param>

               

               

                        <context-param>

                                  <param-name>facelets.RECREATE_VALUE_EXPRESSION_ON_BUILD_BEFORE_RESTORE</param-name>

                                  <param-value>false</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>

                                  <param-value>false</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>facelets.DEVELOPMENT</param-name>

                                  <param-value>false</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>facelets.REFRESH_PERIOD</param-name>

                                  <param-value>2</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>com.sun.faces.responseBufferSize</param-name>

                                  <param-value>500000</param-value>

                        </context-param>

               

                        <context-param>

                                  <param-name>com.sun.faces.verifyObjects</param-name>

                                  <param-value>false</param-value>

                        </context-param>

               

                  <context-param>

                            <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>

                              <param-value>com.sun.facelets.FaceletViewHandler</param-value>

                  </context-param>

                 

                        <listener>

                      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

                  </listener>

               

                  <listener>

                                    <listener-class>uy.com.its.util.PersistenceAppListener</listener-class>

                          </listener>

               

                          <!-- richfaces -->

               

               

                  <filter>

                      <display-name>RichFaces Filter</display-name>

                      <filter-name>richfaces</filter-name>

                      <filter-class>org.ajax4jsf.Filter</filter-class>

                      <init-param>

                                            <param-name>forceparser</param-name>

                                            <param-value>false</param-value>

                                  </init-param>

                                  <init-param>

                                            <param-name>enable-cache</param-name>

                                            <param-value>true</param-value>

                                  </init-param>

                  </filter>

                 

                  <filter-mapping>

                      <filter-name>richfaces</filter-name>

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

                      <dispatcher>REQUEST</dispatcher>

                      <dispatcher>FORWARD</dispatcher>

                      <dispatcher>INCLUDE</dispatcher>

                  </filter-mapping>

               

               

                  <filter>

                                  <filter-name>AuthenticationFilter</filter-name>

                                  <filter-class>uy.com.its.util.AuthenticationFilter</filter-class>

                        </filter>

               

                  <filter-mapping>

                                  <filter-name>AuthenticationFilter</filter-name>

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

                        </filter-mapping>

                        <servlet>

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

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

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

                        </servlet>

               

               

                  <session-config>

                      <session-timeout>60</session-timeout>

                  </session-config>

                 

                        <!-- Faces Servlet Mapping -->

                        <servlet-mapping>

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

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

                        </servlet-mapping>

               

               

                  <servlet> 

                                  <servlet-name>Initialize</servlet-name>  

                                     <servlet-class>uy.com.its.util.timer.InitTimerService</servlet-class>  

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

                        </servlet>

               

                        <servlet>

                                  <servlet-name>Chartlet</servlet-name>

                                  <servlet-class>net.sf.jsfcomp.chartcreator.Chartlet</servlet-class>

                        </servlet>

               

                        <servlet-mapping>

                                  <servlet-name>Chartlet</servlet-name>

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

                        </servlet-mapping>

               

                        <welcome-file-list>

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

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

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

                        </welcome-file-list>

               

               

              </web-app>

               

              Thanks

               

              Regards

              • 4. Re: JBoss 7 + Richfaces 3.3.3 + blank page
                jjamrich

                Hi,

                please can you update info about rest of configuration of your app? Or it is the same as in this thread (except JBoss AS 5.1 of course)?

                 

                RichFaces 3.3.3.Final should work with JSF2 as well, but in this case is important if you want to use JSF 1.2 or not. (according to your other posts I assume you want to use JSF 1.2). In this case you probably have to change default JSF impl in JBoss AS 7.

                 

                This articles should be helpful:

                http://community.jboss.org/blogs/marek-novotny/2011/07/29/seam-2-booking-example-on-jboss-as-7

                http://community.jboss.org/blogs/marek-novotny/2011/07/15/seam-2-jpa-example-on-jboss-as7

                 

                I used this info for modify richfaces-demo application to run on AS7.

                 

                You should find more info for AS7 migration here.

                • 5. Re: JBoss 7 + Richfaces 3.3.3 + blank page
                  smoradi

                  Hi,

                   

                  I was getting blank page by RichFaces 3.3.3.Final and JSF 1.2 in JBoss 7.0.2.Final.

                   

                  What I did to fix it was copule of modifications that I think are important from top to buttom.

                   

                  META-INF/jboss-deployment-structure.xml==========================

                  <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

                      <deployment>

                          <exclusions>

                              <module name="javax.faces.api" slot="main" />

                              <module name="com.sun.jsf-impl" slot="main" />

                              <module name="javax.faces.api" slot="1.2" />

                              <module name="com.sun.jsf-impl" slot="1.2" />

                              <module name="org.hibernate" slot="main" />

                              <module name="org.apache.log4j" slot="main" />

                          </exclusions>

                      </deployment>

                  </jboss-deployment-structure>

                   

                  web.xml==================================================

                  <context-param>

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

                      <param-value>.xhtml</param-value>

                  </context-param>

                   

                  pom.xml==================================================

                  <dependency>

                      <groupId>com.sun.facelets</groupId>

                      <artifactId>jsf-facelets</artifactId>

                      <version>1.1.15.B1</version>

                  </dependency>

                  <dependency>

                      <groupId>javax.faces</groupId>

                      <artifactId>jsf-api</artifactId>

                      <version>1.2_15</version>

                  </dependency>

                  <dependency>

                      <groupId>javax.faces</groupId>

                      <artifactId>jsf-impl</artifactId>

                      <version>1.2_15</version>

                  </dependency>

                   

                  Cheers,

                  Sid