Additions to freemarker samples page
This commit is contained in:
parent
8c0124819c
commit
900caff315
4 changed files with 8 additions and 17 deletions
|
@ -91,6 +91,8 @@ public class SamplesController extends FreemarkerHttpServlet {
|
|||
|
||||
body.put("year", "2001");
|
||||
|
||||
body.put("xsddatetime", "1983-12-07T17:15:28Z");
|
||||
|
||||
body.put("title", "Freemarker Samples");
|
||||
|
||||
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
|
||||
|
|
|
@ -37,15 +37,7 @@ public class TestController extends FreemarkerHttpServlet {
|
|||
|
||||
body.put("title", "Freemarker Test");
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = cal.getTime();
|
||||
body.put("now", now);
|
||||
// In template: ${now?date}, ${now?datetime}, ${now?time}
|
||||
|
||||
body.put("datetime", "1983-12-07T17:15:28Z");
|
||||
|
||||
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
|
||||
|
||||
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue