1 Reply Latest reply on May 19, 2011 2:30 AM by migelct migelct

    FileUpload (onsizerejected) Richfaces - WebFlow

    migelct migelct Newbie

      Hello,

       

      Richfaces 3.3.3 - WebFlow 2.2.0

       

      I'm using the fileupload component of RichFaces, it works properly in local but when it's deployed in a 'pre-production' server it has one error (the other functionalities of the component are working well).

       

      ERROR: If the file is bigger of the maximum allowed size is displaying Transfer error occurred and it's not throwing the javascript event onsizerejected.

       

      Do you have any idea about what can be the problem? Thanks in advance.

       

      Jsf page:

      <rich:fileUpload id="upload" fileUploadListener="#{messageViewTO.uploadAttachment}"
                                  listWidth="400"  listHeight="auto" addControlLabel="#{msgs['view.browse']}" rendered="#{messageViewTO.editable}"
                                  maxFilesQuantity="10" immediateUpload="true" autoclear="true" stopButtonClass="stopButton" entryStopLabelClass="stopButton">
                                  <a4j:support event="onupload" action="#{messageViewTO.displayUploadNotification}" />      
                                  <a4j:support event="onuploadcomplete" reRender="info" />  
                                  <a4j:support event="onsizerejected" reRender="upload" action="#{messageViewTO.displayMaxSizeError}" />   
                  </rich:fileUpload> 
      
      

       

      web.xml:

       

      <!-- Rich Faces Configuration -->
      <!-- The front controller of this Spring Web application, responsible for handling all application requests -->
          <servlet>
              <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
              <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
              <init-param>
                  <param-name>contextConfigLocation</param-name>
                  <param-value></param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
          </servlet>
              
          <!-- Map all /spring requests to the Dispatcher Servlet for handling -->
          <servlet-mapping>
              <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
              <url-pattern>/spring/*</url-pattern>
          </servlet-mapping>
      
          <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>true</param-value>
               </init-param>
               <init-param>
                    <param-name>maxRequestSize</param-name>
                    <param-value>20000000</param-value>
               </init-param>
          </filter>
          <filter-mapping>
              <filter-name>richfaces</filter-name>
              <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
          </filter-mapping>