代码: Map<String, Object> map = new HashMap<>(); Enumeration<String> attributeNames = c.getRequest().getAttributeNames(); while (attributeNames.hasMoreElements()) { String key = attributeNames.nextElement(); //String keyType = c.getRequest().getAttribute(key).getClass().getName(); Object value = c.getRequest().getAttribute(key); map.put(key, value); } c.setAttr("map", map); 前台输出: #for( map : map) #(map.value) #end