request获取请求参数
/** * 方式1 */ Enumeration<?> enu=request.getParameterNames(); while(enu.hasMoreElements()){ String paraName=(String)enu.nextElement(); System.out.println(paraName+": "+request.getParameter(paraName)); } /** * 方式2 */ Map<String,String[]> map = request.getParameterMap(); for (Map.Entry<String, String[]> entry : map.entrySet()) { String kv = entry.getKey() + ":"+Arrays.toString(entry.getValue())+";"; System.out.println("kv:"+kv); }