title: h:inputFile bigger than 1Mb fails to upload
body: <p>I have this simple file upload form.</p>
  
  <p>
              </p>
  
  <pre><code>        &lt;h:outputLabel for="scannedImage" value="Upload scanned image: " /&gt;
          &lt;h:inputFile id="scannedImage" value="#{fileUploadBean.file}" required="true"
                       requiredMessage="Please select a scanned file" /&gt;
          &lt;h:message for="scannedImage" style="color: red;" /&gt;
          &lt;h:commandButton value="Upload" action="#{fileUploadBean.upload()}"/&gt;
      &lt;/h:form&gt;
  </code></pre>
  
  <p>My fileupload works if the filesize is less than 1Mb. But if the filesize is bigger than 1Mb it skips uploading file. There is no error as well. How to make this work so that I can upload filesize bigger than 1Mb. Below is some part of my upload and validation methods.</p>
  
  <pre><code>public String upload() throws IOException, GeneralSecurityException, DecoderException {
  
  InputStream inputStream = file.getInputStream();
          String filename = getFilename(file);
  
          return "index.xhtml";
      }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>public void validateForm (ComponentSystemEvent event) throws IOException{
  FacesContext fc = FacesContext.getCurrentInstance();
          UIComponent components = event.getComponent();
          UIInput uiInputImage = (UIInput) components
                  .findComponent("scannedImage");
          Part file;
          file = (Part)uiInputImage.getLocalValue();
  int maxFileSize = 5*1024*1024;
              if (!(file.getSize()&lt;maxFileSize)){
                  FacesMessage msg = new FacesMessage(
                          "File size must be less than 2Mb");
                  msg.setSeverity(FacesMessage.SEVERITY_ERROR);
                  fc.addMessage(scannedImageId, msg);
                  fc.renderResponse();
              }
  }
  </code></pre>