找了好久才找到的。。。
Action Map<String,List<String>> kindsMap = new HashMap<String,List<String>>(); List<String> aList = new ArrayList<String>(); aList.add("a1"); aList.add("a2"); List<String> bList = new ArrayList<String>(); bList.add("b1"); bList.add("b2"); kindsMap.put("a",aList); kindsMap.pu t("b", bList);
ftl <#list kindsMap?keys as mKey> ${mKey} <#assign item = kindsMap[mKey]> <#list item as itemValue> ${itemValue} </#list> </#list> 如果list里还有实体 可直接 ${itemValue.属性}