HttpSession session = this.request.getSession();
url = session.getServletContext().getRealPath("/")+url;
//获取模板
Template template = this.engine.getTemplate(url);
//往上下文中填入数据
this.context.put("ctxPath", this.request.getContextPath());
UserRole userPrincipal = this.securityContext.getUserPrincipal();
this.context.put(SecurityContext.CURRENT_USER_ROlE, userPrincipal);
this.context.put(SecurityContext.USER_IS_LOGIN, userPrincipal!=null);
this.context.put("ctx", result);
this.context.put("xctx",session.getAttribute(HtmlResponseWriter.OPTION_KEY));
template.render(this.context);
String content = this.context.getOut().toString();
//输出到页面
out.write(content.getBytes("utf-8"));