标签: java session jsf jsf-2.2 java-ee-7
我有一个名为new.xhtml的页面,它在名为New的sessionScoped Bean上运行。经过一些操作后,我需要终止bean,并在用户再次访问new.xhml时启动一个新的。我该怎么办?
new.xhtml
New
答案 0 :(得分:0)
您可以简单地使用httpSessionObj.removeAttribute("YOUR_BEAN_KEY")删除任何会话范围的bean。您可以在此处引用API here。
httpSessionObj.removeAttribute("YOUR_BEAN_KEY")