I have a hash map as below
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);
My Freemarker template is:
<html><body>
<#list hello?keys as key>
${key} = ${hello[key]}
</#list>
</body></html>
The goal is to display key-value pair in the HTML that I'm generating. Please help me to do it. Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…