我有一个哈希表如下Freemarker和hashmap。如何获得键值
HashMap<String, String> map = new HashMap<String, String>();
map.put("one", "1");
map.put("two", "2");
map.put("three", "3");
Map root = new HashMap();
root.put("hello", map);
我Freemarker模板是:
<html><body>
<#list hello?keys as key>
${key} = ${hello[key]}
</#list>
</body></html>
的目标是在我的HTML显示键值对生成。请帮助我做到这一点。谢谢!
显示什么?错误在哪里? – Aubin 2013-02-11 21:40:52