2 Replies Latest reply on Nov 12, 2008 4:45 AM by Nicole Schweighardt

    rich:fileupload with tempfiles - listener not called RichFac

    Nicole Schweighardt Novice


      I try to use rich:fileupload.
      I took the example code from the richfaces examples and everything worked fine.
      Then I wanted the component to create temporary files. So I changed the following in the web.xml:


      But then the example is not working any longer. The listener is not called and I can´t find any temp files on my system (Windows XP)
      So I tried to minimize my example to find out why but now I have no more ideas.
      Here is my code:
       <rich:fileUpload uploadData="#{fileUploadBean.files}" fileUploadListener="#{fileUploadBean.fileUploadListener}" acceptedTypes="jpg, gif, png, bmp"/>

      public class FileUploadBean {
       private ArrayList<File> files = new ArrayList<File>();
       public FileUploadBean(){}
      public synchronized void fileUploadListener(UploadEvent event) throws Exception{
       ...//Code not important because listener is not called
      public ArrayList<File> getFiles() {
       return files;
       public void setFiles(ArrayList<File> files) {
       this.files = files;

      The FileUploadBean is a managedbean in scope "session":

      Any ideas?
      Thanks a lot