1 2 3 Previous Next 42 Replies Latest reply on Sep 18, 2013 5:09 AM by bhanu246 Go to original post
      • 15. Re: richfaces-3.2 - fileUpload
        ilya_shaikovsky

        will examined by Andrei and answered soon.

        • 16. Re: richfaces-3.2 - fileUpload
          akakunin

          Try upload small files. Seems by default fileUpload do not allowed to upload more then 100k files - in my cases upload event also was not fired.

          • 17. Re: richfaces-3.2 - fileUpload
            kaobiore

            > Try upload small files. Seems by default fileUpload do not allowed to upload
            > more then 100k files

            No, it makes no difference uploading small-sized files ... listener-method is not fired!

            And ... If I'm not completely wrong the max. upload-file-size can be configured in the web.xml by adding "init-params" to the Ajax4jsfFilter.

            Example:

             <filter>
             <display-name>Ajax4jsfFilter</display-name>
             <filter-name>ajax4jsf</filter-name>
             <filter-class>org.ajax4jsf.Filter</filter-class>
             <init-param>
             <param-name>createTempFiles</param-name>
             <param-value>true</param-value>
             </init-param>
             <init-param>
             <param-name>maxRequestSize</param-name>
             <param-value>20000000</param-value>
             </init-param>
             </filter>
             <filter-mapping>
             <filter-name>ajax4jsf</filter-name>
             <servlet-name>FacesServlet</servlet-name>
             <dispatcher>REQUEST</dispatcher>
             <dispatcher>FORWARD</dispatcher>
             <dispatcher>INCLUDE</dispatcher>
             </filter-mapping>
            


            • 18. Re: richfaces-3.2 - fileUpload

               

              "kaobiore" wrote:
              Hi!

              I've sent an email (to andrei and ilya) including a http-link to download a war-file for reproducing this mentioned behavior.

              Hope this helps.

              Cheers
              -=k=-


              Hi, I looked into your code. Really, listener does not fire.

              This happens in case of myfaces usage with RF. Currently fileupload component can not work with myfaces properlly.

              I created the issue: http://jira.jboss.com/jira/browse/RF-2935.

              For quick fix I can suggest to switch off ExtensionFilter in your web.xml. I should help to fire listeners.

              Thanks you for posting your code to us.

              • 19. Re: richfaces-3.2 - fileUpload
                kaobiore

                Hi!

                Thank you for your quick response!
                You are absolutely right - removing tomahawk from web.xml helps.

                I hope this bug will be fixed quite soon (next release?) otherwise I have to rewrite big parts of my project (removing/replacing all tomahawk-tags).

                Thank you again.

                Cheers
                Harald

                • 20. Re: richfaces-3.2 - fileUpload

                  I've already fixed this one.

                  Additionally: you may not to delete tomahawk tags. You can just adjust mapping for Extension filter to avoid invoking it for pages containg RF file upload component.

                  To avoid generation of errors from myfaces in case of invalid filter configuration you can set up the following context param in web.xml:

                  <context-param>
                  Check if the extensions-filter has been properly configured.
                  <param-name>
                  org.apache.myfaces.CHECK_EXTENSIONS_FILTER
                  </param-name>
                  <param-value>true</param-value>
                  </context-param>

                  • 21. Re: richfaces-3.2 - fileUpload

                    Remark:

                    <context-param>
                    Check if the extensions-filter has been properly configured.
                    <param-name>
                    org.apache.myfaces.CHECK_EXTENSIONS_FILTER
                    </param-name>
                    <param-value>false</param-value>
                    </context-param>

                    : )

                    • 22. Re: richfaces-3.2 - fileUpload

                      My application doesn't have anything related to myfaces. It's pure RichFaces + Facelets. But the fileUpload listener does not fire.

                      • 23. Re: richfaces-3.2 - fileUpload
                        ilya_shaikovsky

                        rulinsun, you sure you update RF from CR to GA?

                        • 24. Re: richfaces-3.2 - fileUpload

                          If you want, I can send you whole war file. I created a RichFaces test project to test simple things.

                          Those are jar files I have:





















                          and Web.xml

                          <?xml version="1.0" encoding="UTF-8"?>
                          <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
                          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                          http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
                          <display-name>RichFaces_Test</display-name>
                          <context-param>
                          <param-name>javax.faces.CONFIG_FILES</param-name>
                          <param-value>/WEB-INF/faces-config.xml</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.DEFAULT_SUFFIX</param-name>
                          <param-value>.xhtml</param-value>
                          </context-param>
                          <context-param>
                          <param-name>facelets.REFRESH_PERIOD</param-name>
                          <param-value>2</param-value>
                          </context-param>
                          <context-param>
                          <param-name>facelets.DEVELOPMENT</param-name>
                          <param-value>true</param-value>
                          </context-param>
                          <context-param>
                          <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                          <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                          </context-param>


                          <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>true</param-value>
                          </init-param>
                          <init-param>
                          <param-name>maxRequestSize</param-name>
                          <param-value>20000000</param-value>
                          </init-param>


                          <filter-mapping>
                          <filter-name>richfaces</filter-name>
                          <servlet-name>Faces Servlet</servlet-name>
                          REQUEST
                          FORWARD
                          INCLUDE
                          ERROR
                          </filter-mapping>

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


                          <servlet-name>Faces Servlet</servlet-name>
                          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                          <load-on-startup>1</load-on-startup>

                          <servlet-mapping>
                          <servlet-name>Faces Servlet</servlet-name>
                          <url-pattern>/faces/*</url-pattern>
                          </servlet-mapping>
                          <servlet-mapping>
                          <servlet-name>Faces Servlet</servlet-name>
                          <url-pattern>*.jsf</url-pattern>
                          </servlet-mapping>
                          <welcome-file-list>
                          <welcome-file>index.jsp</welcome-file>
                          </welcome-file-list>
                          </web-app>

                          Then the FileUploadBean.java and fileuploadtest.xml are exactly copied from early on this board. My tomcat is 5.5, I used myEclapse to run server in the debug model. The break point in the very first line in the listener method was't hit.

                          Thanks!

                          Rulin

                          • 25. Re: richfaces-3.2 - fileUpload

                            The jar files were missing in previous post:

                            WebRoot/WEB-INF/lib/jsf-facelets.jar
                            WebRoot/WEB-INF/lib/log4j-1.2.15.jar
                            WebRoot/WEB-INF/lib/jsf-api.jar
                            WebRoot/WEB-INF/lib/jsf-impl.jar
                            WebRoot/WEB-INF/lib/jstl-1.2.jar
                            WebRoot/WEB-INF/lib/el-api.jar
                            WebRoot/WEB-INF/lib/el-ri.jar
                            WebRoot/WEB-INF/lib/commons-collections-3.2.jar
                            WebRoot/WEB-INF/lib/commons-digester-1.8.jar
                            WebRoot/WEB-INF/lib/commons-beanutils-1.7.0.jar
                            WebRoot/WEB-INF/lib/richfaces-api-3.2.0.GA.jar
                            WebRoot/WEB-INF/lib/richfaces-impl-3.2.0.GA.jar
                            WebRoot/WEB-INF/lib/richfaces-ui-3.2.0.GA.jar
                            WebRoot/WEB-INF/lib/commons-logging-1.1.jar

                            • 26. Re: richfaces-3.2 - fileUpload

                              Yes. Please send to us your war file. It will help to find the problem.

                              Thanks.

                              • 27. Re: richfaces-3.2 - fileUpload
                                ilya_shaikovsky

                                please create a issue in our jira and attach your war file.

                                • 28. Re: richfaces-3.2 - fileUpload

                                  Done: RF-2958

                                  Thanks!

                                  Rulin

                                  • 29. Re: richfaces-3.2 - fileUpload

                                    Thank you. But it will be carefull to get your application with source code.