tags:

views:

66

answers:

1

how to implement logout process in JSF application

+2  A: 
public String logout() {
    ((HttpSession) FacesContext.getCurrentInstance().getExternalContext()
         .getSession()).invalidate();
     return "homePage;
}

and

<h:commandLink value="#{msg.logout}" action="#{logoutBean.logout}" />
Bozho
thank u Bozho. 1 question will my faces session map objects i.e. FacesContext.getCurrentInstance().getExternalContext().getSessionMap() will also be invalidated?
rahul_d_m
they should be.
Bozho