Is there any method to expire or end or time out a JSF session by changing the code.
For example, if the user clicks the log out button, it needs to clear all the session related data without needing to close the browser or waiting till time out?
Is there any method to expire or end or time out a JSF session by changing the code.
For example, if the user clicks the log out button, it needs to clear all the session related data without needing to close the browser or waiting till time out?
You can use:
FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
and then immediately do a redirect to a new resource (make a new request).