{
Gson gson = new Gson();
// old browser need to see this response as html to work
response.setContentType("text/html");
JSONUploadResponse jsonResponse = new JSONUploadResponse();
jsonResponse.addUploadFileSizeLimitExceeded(
e.getActualSize(), e.getPermittedSize());
response.getWriter().print(gson.toJson(jsonResponse));
response.flushBuffer();
}
else