title: Primefaces fileUploadListener not working
body: <p>I tried to upload a file with primefaces into my tomcat7 server. I'm using primfaces4. file upload listener doesn't call <code>handleFileUpload</code> and hiii not apeared in console
  my bean is this:</p>
  
  <pre><code>package Pin;
  import javax.enterprise.context.SessionScoped;
  import javax.faces.bean.ManagedBean;
  
  import org.primefaces.component.fileupload.FileUpload;
  import org.primefaces.event.FileUploadEvent;
  import org.primefaces.model.UploadedFile;
  
  import Util.U;
  @ManagedBean(name="pinBean")
  @SessionScoped
  public class PinBean{
      private UploadedFile file;
      public PinBean(){
  
          U.wl("Start");
      }
      public UploadedFile getFile() {
          U.wl("get");
          return file;
      }
  
      public void setFile(UploadedFile file) {
          U.wl("set");
          this.file = file;
      }
      public void handleFileUpload(FileUploadEvent event) {
          UploadedFile file = event.getFile();
          U.wl("hiii");
          //application code
          }
  
  
  }
  </code></pre>
  
  <p>and my xhtml is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:t="http://myfaces.apache.org/tomahawk"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:p="http://primefaces.org/ui"&gt;
  
  &lt;h:form&gt;
  &lt;h:form enctype="multipart/form-data"&gt;
  &lt;p:fileUpload fileUploadListener="#{pinBean.handleFileUpload}" auto="true" mode="advanced"/&gt;
  &lt;/h:form&gt;
  &lt;/h:form&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"&gt;
    &lt;display-name&gt;testUpload&lt;/display-name&gt;
    &lt;filter&gt;
  
  &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
  &lt;filter-class&gt;org.primefaces.webapp.filter.FileUploadFilter&lt;/filter-class&gt;
  &lt;init-param&gt;
  &lt;param-name&gt;thresholdSize&lt;/param-name&gt;
  &lt;param-value&gt;2097152&lt;/param-value&gt;
  &lt;/init-param&gt;     
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
  &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;/filter-mapping&gt; 
  &lt;servlet&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;  
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>