Google News
logo
JSF - Interview Questions
How to terminate the session in JSF?
public String logout() {
  FacesContext fc = FacesContext.getCurrentInstance();
  HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);
  session.invalidate();
  return "loginPage";
}

 

Advertisement