FastWriter out = new FastWriter(res.getOutputStream(),
res.getCharacterEncoding());
try {
WebMacro wm = new WM(); // optionally WM("/path/to/config/file")
Context c = wm.getWebContext(req, res);
c.put("date", new Date());
Template tmpl = wm.getTemplate("hello.wm");
tmpl.write(out, c);
out.flush();
}
catch (WebMacroException e) {
throw new ServletException(e);
}