
Invalidate Session in JSF
How to invalidate session in JSF?

ExternalContext#invalidateSession() - can be used to invalidate session in JSF. See the code below..
@ManagedBean
@SessionScoped
public class UserManager {
private User current;
public String logout() {
FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
return "home.xhtml?faces-redirect=true";
}
// ...
}

does not work!!!!
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.