如何将Request对象中的参数列表打印出来

时间:2022-06-14 02:07:49
Map<String, String[]> map = request.getParameterMap();
Set<Map.Entry<String, String[]>> keys = map.entrySet();
Iterator<Map.Entry<String, String[]>> i = keys.iterator();
System.out.printf("+__+");
while (i.hasNext()){
Map.Entry<String, String[]> it = i.next();
System.out.println(it.getKey()+":"+Arrays.toString(it.getValue()));
}