requestToMap

public static HashMap requestToMap(HttpServletRequest request) {

        HashMap parameterMap = new HashMap();
        Enumeration names = request.getParameterNames();
        if (names != null) {
            for (String name : Collections.list(names)) {
                parameterMap.put(name, request.getParameter(name));
            }
        }
        return parameterMap;
    }

你可能感兴趣的:(Java,java,开发语言)