title: JSF 2.2 multipart form is not getting submitted
body: <p>When I upload a file in jsf 2.2 project with jboss 7.1
  its prevent to submit form.
  help me out....</p>
  
  <p>here is sample code for upload a file</p>
  
  <p>This is my welcome.xhtml</p>
  
  <pre><code>&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://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
  &lt;h:head&gt;
  &lt;/h:head&gt;
  &lt;h:body&gt;
      &lt;h:form  enctype="multipart/form-data"  &gt;
      &lt;h:outputLabel value="Upload File : " /&gt;
      &lt;h:inputFile value="#{myController.file}"/&gt; 
      &lt;h:commandButton value="Submit" action="#{myController.mycontroller}" /&gt;
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is my backing bean MyController.java</p>
  
  <pre><code>public class MyController {
  
      private Part file;
      public Part getFile() {
          return file;
      }
  
      public void setFile(Part file) {
          this.file = file;
      }
  
      public String mycontroller() throws IOException {
  
          System.out.println("--call mycontroller method--");
  
          UploadFile uf = new UploadFile();
  
          boolean b = uf.upload(getFile());
          System.out.println(b);
  
          return "success.xhtml";
      }
    }
  </code></pre>
  
  <p><strong>Edit:1</strong>
  I have one form with file upload and a <code>&lt;h:commandButton&gt;</code>, where I want to get uploaded file's information. Problem I am facing, the button is not firing when I added <code>enctype="multipart/form-data"</code>. So any advice will be helpful to me.</p>