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"));