站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2SE 专题JForum怎么在框架外部获取SimpleHash

JForum怎么在框架外部获取SimpleHash

摘要: JForum怎么在框架外部获取SimpleHash


System.err.println(JForumExecutionContext.exists());

打印出来都是false,怎么才能打印出来是true;

我现在想获取的是当前登陆的用户的id,一般的做法是存在session里面,但JForum所使用的freemarker是用SimpleHash来做.

现在想取取不出来,试了很久JForumExecutionContext.exists()都为false,JForum官方论坛上面也没任何资料,有研究过JForum大侠讲讲看.


应该可以使用SessionFacade.getUserSession(JForumExecutionContext.getRequest().getSession().getId()).getUserId();


或者直接SessionFacade.getUserSession().getUserId();


搞定,谢谢peniy(lifefree)


↑返回目录
前一篇: [求助]文件读取问题
后一篇: 如何用dollar符号显示Calendar对象,感谢大家!