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

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()));
}

posted @ 2018-08-01 18:22  枫飘雪落  阅读(4619)  评论(0编辑  收藏  举报