public final int doEndTag() { try { getPage().writeBody(getOut()); } catch (Exception e) { trace(e); } return EVAL_PAGE; }
private Map<String, Object> getVelocityParams(HttpServletRequest request, Page page, HttpServletResponse response) throws IOException { Map<String, Object> velocityParams = getDefaultVelocityParams(); velocityParams.put("page", page); velocityParams.put("title", page.getTitle()); StringWriter bodyBuffer = new StringWriter(); page.writeBody(OutputConverter.getWriter(bodyBuffer)); velocityParams.put("body", bodyBuffer); if (page instanceof HTMLPage) { HTMLPage htmlPage = (HTMLPage) page; StringWriter buffer = new StringWriter(); htmlPage.writeHead(OutputConverter.getWriter(buffer)); velocityParams.put("head", buffer.toString()); } // This allows the templates to include JSPs, using $dispatcher.include() velocityParams.put("dispatcher", new BufferingRequestDispatcher(request, response)); velocityParams.put("i18n", getJiraAuthenticationContext().getI18nHelper()); velocityParams.put("req", request); return velocityParams; }
page.writeBody(OutputConverter.getWriter(bodyBuffer)); velocityParams.put("bodyHtml", bodyBuffer);
page.writeBody(OutputConverter.getWriter(bodyBuffer)); velocityParams.put("body", bodyBuffer);