5 Replies Latest reply on Sep 28, 2011 10:36 AM by dimaro.enterprise

    fileUpload not working anymore after frameworks update

    dimaro.enterprise

      Hi everybody

       

      After having broken my head on this problem for days, and having read all the threads about rich:fileUpload laying around on the Web, I resolved to ask for help... Please Help!

       

      We have an application based on Spring, SWF, JSF, Richfaces and everything worked fine until we had to pass from JBoss 4 to JBoss 6.

      To do so, we upgraded all the frameworks: Spring 2.5 -> Spring 3.0, SWF -> SWF 2.3.0, JSF 1.2 -> JSF 2.0, Richfaces 3.3 -> Richfaces 4.0.

      We had some pain to manage all the changes occured to Richfaces, but al last everything work fine again... except fileUpload!

       

      At first we always got a "Server error" message showed directly in the page (and nothing in console) while stroking Upload button

      Server Error.jpg

      Then we took Richfaces 4.0.1-M1 and this error disappeared, the file seems to be uploaded, but the fileUploadListener is never called...

       

      Here is my page (by now I cut away quite everything):

       

       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <f:view xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:sf="http://www.springframework.org/tags/faces"
          xmlns:rich="http://richfaces.org/rich"
          contentType="text/html" encoding="UTF-8">
      <html>
          <h:head>
              <title>    <ui:insert name="pageTitle" /> </title>
              <sf:includeStyles />
              <sf:resourceGroup>
                  <sf:resource path="/style/master.css" />
              </sf:resourceGroup>
              <sf:includeScripts />
          </h:head>
          
          <h:body>
              <h:form id="datiSegnalazioneForm">
                  <rich:panel>
                      <rich:fileUpload id="fuAttachments"
                          fileUploadListener="#{segnalazioneBean.attachFile}">
                      </rich:fileUpload>
                  </rich:panel>
              </h:form>
          </h:body>    
      </html>
      </f:view>
      

       

      And the Web.XML is in attachment (there's createTempFiles=true but I also tried createTempFiles=false).

       

      Let me add that the "segnalazioneBean" is in "flowScope" and it's visibile to the page, in fact other fields (that were on the page), are correctly set to the bean's attributes.

       

      Any suggestion?

      thank's in advance

      Ivan