6 Replies Latest reply on Dec 7, 2009 6:30 AM by Nick Belaevski

    Richfaces warning after upgrading to 3.3.2 GA from 3.1.4 GA

    Ashish Gupta Newbie

      Hello pals,

      I am upgraded my project with richfaces 3.3.2 GA from 3.1.4 GA.
      After upgradation I am seeing this warning in console-

      2009-12-04 13:20:56 WARN [org.ajax4jsf.webapp.BaseFilter] [user=xxx] MyFaces Extensions Filter should be configured to execute *AFTER* RichFaces filter. Refer to SRV.6.2.4 section of Servlets specification on how to achieve that.

      I have tomahawk 1.1.4 jar in my project.

      please help me to resolve this issue.

      Cheers,
      Ashish

        • 1. Re: Richfaces warning after upgrading to 3.3.2 GA from 3.1.4
          Ilya Shaikovsky Master

          just follow the suggestion from the warning. you defined extendsion filter before richfaces one. But this will cause usage problems.

          • 2. Re: Richfaces warning after upgrading to 3.3.2 GA from 3.1.4
            Ashish Gupta Newbie

            Thanks ilya_shaikovsky for ur response.

            See my web.xml for relevent filters -

            <display-name>RichFaces Filter</display-name>
            <filter-name>richfaces</filter-name>
            <filter-class>org.ajax4jsf.FastFilter</filter-class>
            <init-param>
            <param-name>forceparser</param-name>
            <param-value>false</param-value>
            </init-param>


            <filter-name>MyFacesExtensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
            <init-param>
            Set the size limit for uploaded files. Format: 10 - 10 bytes 10k
            - 10 KB 10m - 10 MB 1g - 1 GB
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
            </init-param>


            <filter-mapping>
            <filter-name>richfaces</filter-name>
            <servlet-name>FacesServlet</servlet-name>
            REQUEST
            FORWARD
            INCLUDE
            </filter-mapping>
            <filter-mapping>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
            </filter-mapping>
            <filter-mapping>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <url-pattern>/pages/*</url-pattern>
            </filter-mapping>


            <servlet-name>FacesServlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>2</load-on-startup>

            <servlet-mapping>
            <servlet-name>FacesServlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
            </servlet-mapping>

            as url-pattern filter loading first that is why i get warn.
            Can u plz help me what to chane so that richfaces filter will execute before MyFacesExtensionsFilter.

            thanks in advance.
            Cheers,
            Ashish

            • 3. Re: Richfaces warning after upgrading to 3.3.2 GA from 3.1.4
              Ilya Shaikovsky Master

              map extension filter to servlet by name also.

              • 4. Re: Richfaces warning after upgrading to 3.3.2 GA from 3.1.4
                Ashish Gupta Newbie

                Hello ilya_shaikovsky,

                Thanks for reply, but same issue.
                I think we need to give <url-pattern> for Richfaces filter then it will be executed before MyFacesExtensionsFilter.
                Please correct me if I am worng.
                If u know the <url-pattern> for richfaces plz let me know so i can try it.

                Cheers,
                Ashish

                • 5. Re: Richfaces warning after upgrading to 3.3.2 GA from 3.1.4
                  Ashish Gupta Newbie

                  Hi ilya_shaikovsky,
                  I found the solution for it.

                  <filter-mapping>
                  <filter-name>richfaces</filter-name>
                  <url-pattern>*.jsf</url-pattern>
                  </filter-mapping>

                  by above code warn is not appearing as richfaces filter is executed first.
                  I will make some tests to make sure it does not cause any issue.

                  Please give ur feedback about this solution.
                  Thanks for ur time and suggestion.

                  Cheers,
                  Ashish

                  • 6. Re: Richfaces warning after upgrading to 3.3.2 GA from 3.1.4
                    Nick Belaevski Master

                     

                    "ashishsg" wrote:
                    by above code warn is not appearing as richfaces filter is executed first.
                    I will make some tests to make sure it does not cause any issue.

                    Hi,

                    This states you've fixed the configuration problem :).