ERROR
TokenHelper错误创建HttpSession由于响应致力于为客户端。您可以在将结果呈现给客户端之前使用CreateSessionInterceptor或HttpSession从操作中创建。
您可以使用类似以下的代码创建Http会话
ActionContext context = ActionContext.getContext(); SessionMap<String, T> sessionMap = (SessionMap<String, T>) context.getSession(); if (sessionMap == null) { sessionMap = new SessionMap<String, T>(ServletActionContext.getRequest()); context.setSession((Map<String, Object>) sessionMap); }有
createSession拦截器。
HttpSession如果不存在,此拦截器将创建,也SessionMap将重新创建并放入ServletActionContext。<@s.token>在freemarker模板中使用标记时,这特别有用。标记确实要求HttpSession已经创建了一个,因为freemarker立即将响应提交给客户端。



