- synchronized (replyTemplate) {
- replyTemplate.set("reply", reply);
- try {
- replyTemplate.render(stringWriter);
- } catch (TemplateException te1) {
- /* TODO - shouldn’t happen. */
- } finally {
- Closer.close(stringWriter);
- }
+ TemplateContext templateContext = webInterface.getTemplateContextFactory().createTemplateContext();
+ templateContext.set("core", webInterface.getCore());
+ templateContext.set("request", request);
+ templateContext.set("reply", reply);
+ templateContext.set("currentSone", currentSone);
+ try {
+ replyTemplate.render(templateContext, stringWriter);
+ } catch (TemplateException te1) {
+ /* TODO - shouldn’t happen. */
+ } finally {
+ Closer.close(stringWriter);