title: Handler execution resulted in exception: Required MultipartFile parameter 'file' is not present
body: <p>My Controller code :</p>
  
  <pre><code>@RequestMapping(value = "/rest/auth/admin/test/responseTest", method = RequestMethod.POST)
  @ResponseBody
  public ResponseEntity&lt;ResponseVO&gt; responseTest(@RequestParam("file") MultipartFile file,
          @RequestParam(value = "testId", required = true) long testId) {
  </code></pre>
  
  <p>I have already added the multipartResolver bean to my application-context.xml</p>
  
  <pre><code>&lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" /&gt;
  </code></pre>
  
  <p>My javascript code :</p>
  
  <pre><code>var fd = new FormData();
  fd.append('file', $('input[type=file]')[0].files[0]);
  fd.append("label", "WEBUPLOAD");
  var headers = {};
  headers[Constants.XCSRFTOKENCookieName] = util.getCookie(Constants.XCSRFTOKENCookieName);
  var url = "rest/auth/admin/test/responseTest?responseTest=123";
  var dataType = "json";
  var contentType = "application/json";
  $.ajax({
      url: url,
      type: "POST",
      data: fd,
      dataType: dataType,
      async: isAsync,
      headers: headers,
      enctype: contentType,
      processData: false, // tell jQuery not to process the data
      contentType: false, // tell jQuery not to set contentType
      success: function(result, status, jqXHR) {
          resultObj = result;
          if (successCallBack != null) {
              successCallBack(resultObj);
          }
          //util.hideLoader();
      },
      error: function(jqXHR, textStatus, errorThrown) {
          console.log("Error : " + errorThrown);
          resultObj = jqXHR.responseJSON;
          if (errorCallBack != null) {
              errorCallBack(resultObj);
          }
          //util.hideLoader();
      }
  });
  </code></pre>
  
  <p>When I am calling the above Ajax I am getting the following error at server side.</p>
  
  <pre><code>[org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] &gt; logException() : 186 - Handler execution resulted in exception: Required MultipartFile parameter 'file' is not present
  </code></pre>
  
  <p>Please help me to resolve this issue.</p>