1. html get response is html page
response.setContentType("text/html; charset=utf-8")
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, respJson);
2. html get json error message
response.setContentType("application/json");
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.getWriter().write(respJson);