@Override
public int doStartTag() throws JspException {
WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
JadeConfiguration jadeConfiguration = context.getBean(JadeConfiguration.class);
JadeTemplate jadeTemplate = context.getBean("TemplateComment", JadeTemplate.class);
Map<String, Object> data = Maps.newHashMap();
data.put("comment", comment);
data.put("enableSchema", enableSchema);
data.put("topic", new ApiCommentTopicInfo(
topic.getId(),
topic.getLink(),
commentsAllowed
));
data.put("showMenu", showMenu);
// TODO: move to globals
data.put("dateFormat", new SignTag.DateFormatHandler());
jadeConfiguration.renderTemplate(jadeTemplate, data, pageContext.getOut());
/*
ObjectMapper mapper = new ObjectMapper();
try {
pageContext.getOut().append(mapper.writer().writeValueAsString(data.get("user")));