[jQuery] Form Plugins file upload with return json issue in IE

[jQuery] Form Plugins file upload with return json issue in IE

I am using jQuery Form Plugins (v3.51) to upload a file that contains a list of user ids. The Java servlet will retrieve the corresponding user objects and return them in json format. The code works in Chrome. 

For IE (v11), there is no issue in uploading the file to server. But after writing json object back, the client side does not get json object as expected. Instead, the data is string of html code for whole page. Are there any special settings in server side I am missing? Thanks a lot in advance.

Below are code snippets.

Java

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
   //get all user ids from uploaded file and retrieve users
   ... ... ...

   response.setContentType("application/json");
   response.setCharacterEncoding("utf-8");
   PrintWriter writer = response.getWriter();
    
   Gson gson = new Gson();
   String json = gson.toJson(userList);
   writer.print(json);
   writer.flush();
}

HTML

<form id="upload-form" method="post" enctype="multipart/form-data" action="xxxServlet">
   <input type=file id="uploadFile" name="uploadFile" value="Upload File"/>
   <input type="submit" value="Submit" id="submit" />
</form>

Javascripts

$('#upload-form').ajaxForm({
success: function(data) {
... ...
}
});

For Chrome, the data is a json object as expected. But for IE, it is a html code in string format.

<form id=\"upload-form\" action=\" http://localhost:8080/nps/GetHoldListForCardServlet\" encType=\"multipart/form-data\" method=\"POST\" encoding=\"multipart/form-data\">\n\t\t\t\t\t<input name=\"userName\" id=\"userName\" type=\"hidden\" value=\"SZALL\">\n\t\t\t\t\t<hr>\n\t\t\t\t
... ... ...
<!--  mainContent -->\n\t\t    \t<div id=\"footer\">\n\n<br>\n<a class=\"contactAdmin\" id=\"contactSiteAdmin\" href=\"#\">Contact the Intranet Site Administrator</a>\n\n\n\t\t    \t</div>\n\t\t    </div> <!-- mainContentWrapper -->\n\t </div> <!-- pageWrapper -->\n\n\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<iframe name=\"jqFormIO1500736569748\" src=\"about:blank\" style=\"left: -1000px; top: -1000px; position: absolute;\"></iframe>"