myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Airton Carrara <lista.myfa...@gmail.com>
Subject session.invalidate()
Date Fri, 02 Dec 2005 18:14:10 GMT
Hi.

The session doesn't invalidate.

On iw.jsp:
    <h:commandLink action="#{logoutBean.logout}" value="Logout"/>

On LogoutBean.java, logout() method:
        HttpSession session = (HttpSession)
           FacesContext.getCurrentInstance
().getExternalContext().getSession(true);
        session.invalidate();

I've noticed that the session becomes clean, through:
        Map map  = fc.getExternalContext().getSessionMap();
        for (Iterator it=map.entrySet().iterator(); it.hasNext(); ) {
            Map.Entry entry = (Map.Entry)it.next();
            Object key = entry.getKey();
            System.err.println("Map(key) = "+key.toString());
            Object value = entry.getValue();
            System.err.println("Map(value) = "+value.toString());
        }

But the application still keeps the session values... back browser button or
another session of the browser show it.

Any idea please?

Thanks.

Regards,
Airton
(using MyFaces 1.1.1)

Mime
View raw message