private Map<String, String> getParamsFromFormDataByNames(HttpServletRequest request){ Map<String, String> map =new HashMap<>(); Enumeration<String> er = request.getParameterNames(); while (er.hasMoreElements()) { String name = (String) er.nextElement(); String value = request.getParameter(name); map.put(name, value); } return map; }