title: File upload doesn't work with PrimeFaces 4.0, JSF Mojarra 2.2.3 and Wildfly Beta 1
body: <p>I have a web application running on:</p>
  
  <ul>
  <li>Wildfly Beta 1</li>
  <li>JSF Mojarra 2.2.3 (from Wildfly)</li>
  <li>Primefaces 4.0</li>
  <li>rewrite-servlet-2.0.7.Final / rewrite-config-prettyfaces-2.0.7.Final</li>
  <li>commons-io-2.4 / commons-fileupload-1.3</li>
  </ul>
  
  <p>And I have problem with file upload component (advanced and simple mode doesn't work, never print <strong><em>inside upload()</em></strong>).</p>
  
  <p>Same is even run without rewrite-servlet-2.0.7.Final/rewrite-config-prettyfaces-2.0.7.Final libs.</p>
  
  <p>My upload.xhtml file:</p>
  
  
  
  <pre class="lang-html prettyprint-override"><code>&lt;h:form prependId="false" id="formLateralUpload" enctype="multipart/form-data"&gt;
      &lt;h:panelGrid columns="1" cellpadding="5"&gt;
          &lt;p:fileUpload mode="advanced" multiple="true" update="@widgetVar(msg)"
              fileUploadListener="#{test.upload}" auto="true" sizeLimit="10500000"/&gt;
      &lt;/h:panelGrid&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>My bean:</p>
  
  
  
  <pre class="lang-java prettyprint-override"><code>@ManagedBean(name = "test")
  @ViewScoped
  public class Test {
      private UploadedFile      file;
  
      public UploadedFile getFile() {
          return file;
      }
  
      public void setFile(UploadedFile file) {
          this.file = file;
      }
  
      public void upload(FileUploadEvent event) {
          System.out.println("inside upload()");
      }
  }
  </code></pre>
  
  <p>web.xml:</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://xmlns.jcp.org/xml/ns/javaee"
      xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
      id="test"
      version="3.1"&gt;
      &lt;display-name&gt;test&lt;/display-name&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;/&lt;/welcome-file&gt;
      &lt;/welcome-file-list&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;/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;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
          &lt;dispatcher&gt;FORWARD&lt;/dispatcher&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;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;javax.faces.PARTIAL_STATE_SAVING&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;error-page&gt;
          &lt;exception-type&gt;javax.faces.application.ViewExpiredException&lt;/exception-type&gt;
          &lt;location&gt;/redirect&lt;/location&gt;
      &lt;/error-page&gt;
  &lt;/web-app&gt;
  </code></pre>