【发布时间】:2016-05-08 14:34:23
【问题描述】:
我尝试在 JSF 会话中保存 id 和 name,但它们没有被存储。
当我刷新页面时它消失了。 这是我正在使用的代码:
HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);
session.setAttribute("id", 123);
session.setAttribute("name", "a name");
我想通过会话做的是使用过滤器保护我的页面,并在其中测试会话是否存在
请帮帮我
问候
【问题讨论】:
-
请有人回答我
标签: jsf jakarta-ee