httpsession

How to invalidate session in JSF 2.0?

安稳与你 提交于 2019-11-26 01:06:56
问题 What is the best possible way to invalidate session within a JSF 2.0 application? I know JSF itself does not handle session. So far I could find private void reset() { HttpSession session = (HttpSession) FacesContext.getCurrentInstance() .getExternalContext().getSession(false); session.invalidate(); } Is this method correct? Is there a way without touching the ServletAPI? Consider a scenario wherein a @SessionScoped UserBean handles the login-logout of a user. I have this method in the same

How to invalidate session in JSF 2.0?

那年仲夏 提交于 2019-11-26 00:58:50
What is the best possible way to invalidate session within a JSF 2.0 application? I know JSF itself does not handle session. So far I could find private void reset() { HttpSession session = (HttpSession) FacesContext.getCurrentInstance() .getExternalContext().getSession(false); session.invalidate(); } Is this method correct? Is there a way without touching the ServletAPI? Consider a scenario wherein a @SessionScoped UserBean handles the login-logout of a user. I have this method in the same bean. Now when I call the reset() method after I'm done with necessary DB updates, what will happen to