1 Reply Latest reply on Jul 9, 2012 6:42 AM by Sanjeev Shrestha

    Problem of migration Richfaces 3 -> 4

    Daniel PM Newbie

      Hi ¡

       

       

      I have a programa that use :

       

      JSF 2 (Mojarra 2.0)

      Tomahawl 1.1.13

      RichFaces 4.2.2

      Pretty-faces 2

       

      The problem is that when i open de app the tag of jsf aren´t transform to code html :

       

       

      <body xmlns="http://www.w3.org/1999/xhtml"> 
      <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"> 
      <ui:include src="/WEB-INF/html/include/platino/certificadoLogin.xhtml"> 
      <ui:param name="navegacion" value="mis-avisos"/> 
      </ui:include> 
      </ui:composition> 
      </body>
      

       

      This is mi web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="egovernment-eoffice-application" version="2.5" 
               xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
               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_2_5.xsd">
      
                <display-name>egovernment-eoffice-application</display-name>
      
                <context-param>
                          <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
                          <param-value>/WEB-INF/html/arte-tags/taglib.xml</param-value>
                </context-param>
                <context-param>
                          <param-name>facelets.DEVELOPMENT</param-name>
                          <param-value>false</param-value>
                </context-param>
                <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>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
              <param-value>true</param-value>    <!-- por error con jsf y ajaxPoll . ArrayIndexOutOfBoundsException -->
           </context-param>
                <context-param>
                          <param-name>javax.faces.CONFIG_FILES</param-name>
                          <param-value>
                                    /WEB-INF/faces-config/faces-manage-bean.xml,/WEB-INF/faces-config/faces-navigation-rule.xml,/WEB-INF/faces-config/faces-converter.xml,/WEB-INF/faces-config/faces-application.xml,/WEB-INF/faces-config/faces-validator.xml
                          </param-value>
                </context-param>
      
                <!-- Valores por defecto -->
                <context-param>
                          <param-name>org.apache.myfaces.redirectTracker.POLICY</param-name>
                          <param-value>org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy</param-value> 
                </context-param>
                <context-param>
                          <param-name>org.apache.myfaces.redirectTracker.MAX_REDIRECTS</param-name>
                          <param-value>20</param-value> 
                </context-param>
                <context-param>
                          <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
                          <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value> 
                </context-param>
                <context-param>
                          <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
                          <param-value>/faces/myFacesExtensionResource</param-value> 
                </context-param>
                <context-param>
                          <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
                          <param-value>true</param-value> 
                </context-param> 
                <!-- /Valores por defecto --> 
      
      
                <!-- jboss el expressions allow method params -->
                <context-param>
                          <param-name>com.sun.faces.expressionFactory</param-name>
                          <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
                <!-- MIGRACION
                          <param-name>com.sun.faces.expressionFactory</param-name>
                          <param-value>org.jboss.el.ExpressionFactoryImpl</param-value> -->
                </context-param>
      
      
      
      
                <!--  tratar la expiracion de la sesion -->
                <context-param>
                    <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
                    <param-value>true</param-value>
                </context-param> 
                <context-param>
              <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
              <param-value>true</param-value>
                </context-param>
                <!--  /tratar la expiracion de la sesion -->
      
      
                <!-- Application Setup -->
                <listener>
                          <listener-class>com.egovernment.eoffice.application.SetupApplicationListener</listener-class>
                </listener>
                <!-- /Application Setup -->
      
          <listener>
              <listener-class>com.egovernment.eoffice.application.ws.EGovernmentServiceLocator</listener-class>
          </listener>
      
      
                <!-- MyFaces -->
      
                <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>
                <!-- /MyFaces -->
      
      
      
                <!--  Rest -->
      
      
                <filter>
                          <filter-name>RestFaces Filter</filter-name>
                          <filter-class>org.restfaces.Filter</filter-class>
                          <init-param>
                                    <param-name>faces-mapping</param-name>
                                    <param-value>.faces</param-value>
                          </init-param>
                </filter>
      
      
                <filter-mapping>
                          <filter-name>RestFaces Filter</filter-name>
                          <url-pattern>/*</url-pattern>
                </filter-mapping>
                <!--  /Rest -->
      
      
                <!-- RichFaces  -->
                <!-- MIGRACION
                <filter> 
              <display-name>RichFaces Filter</display-name> 
              <filter-name>richfaces</filter-name> 
              <filter-class>org.ajax4jsf.Filter</filter-class> 
              <init-param>
                                    <param-name>createTempFiles</param-name>
                                    <param-value>false</param-value>
                          </init-param>
                          <init-param>
                                    <param-name>maxRequestSize</param-name>
                                    <param-value>15000000</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>
              <dispatcher>ERROR</dispatcher>        
          </filter-mapping>
           -->
                <filter>
                    <filter-name>sceAuthCookieFilter</filter-name>
                    <filter-class>com.egovernment.eoffice.application.usuario.cookie.SceAuthCookieFilter</filter-class>
                </filter>
                <filter-mapping>
                    <filter-name>sceAuthCookieFilter</filter-name>
                    <servlet-name>Faces Servlet</servlet-name>
                </filter-mapping>
      
                <context-param>
                          <param-name>org.richfaces.skin</param-name>
                          <param-value>plain</param-value>
                </context-param>
      
                <context-param>
                          <param-name>org.richfaces.enableControlSkinning</param-name>
                          <param-value>false</param-value>
                </context-param> 
                <!-- /RichFaces  --> 
      
                <context-param>
                          <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
                          <param-value>false</param-value>
                </context-param> 
      
      
                <session-config>
                          <session-timeout>30</session-timeout>
                </session-config>
      
      
                <!-- Error pages -->
                <error-page>
                          <exception-type>java.lang.Throwable</exception-type>
                          <location>/otros/error.faces</location>
                </error-page>
                <error-page>
                          <error-code>404</error-code>
                          <location>/otros/error.faces</location>
                </error-page>
      
      
                <welcome-file-list>
                          <welcome-file>index.jsp</welcome-file>
                </welcome-file-list>
      
      </web-app>
      

       

       

      When i open the app i have this message in he console :

       

      09:05:02,812 INFO  [javax.enterprise.resource.webcontainer.jsf.lifecycle] JSF1027: [/empleo/egovernment-eoffice-application] los ELResolvers para JSF no se han registrado con el contenedor JSP.
      

       

       

      i don´t nkow whats it the problem

        • 1. Re: Problem of migration Richfaces 3 -> 4
          Sanjeev Shrestha Novice

          This

          <context-param>
                              <param-name>facelets.DEVELOPMENT</param-name>
                              <param-value>false</param-value>
                    </context-param>

          changes to

          <context-param>
                              <param-name>
          javax.faces.FACELETS_DEVELOPMENT</param-name>
                              <param-value>false</param-value>
                    </context-param>

           

          This is no longer necessary

          <filter>
                  <display-name>RichFaces Filter</display-name>
                  <filter-name>richfaces</filter-name>
                  <filter-class>org.ajax4jsf.Filter</filter-class>
                  <init-param>
                                        <param-name>createTempFiles</param-name>
                                        <param-value>false</param-value>
                              </init-param>
                              <init-param>
                                        <param-name>maxRequestSize</param-name>
                                        <param-value>15000000</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>
                  <dispatcher>ERROR</dispatcher>       
              </filter-mapping>

           

          I think you better have a look at an example from JSF 2.0 A complete reference. Please post what the error is.