Hi Rico,
I saw this code sniplet in some other cases, so I included it in my logout stuff.
Tomcat's Struts based admin app does do the same.
-Matthias
Rico Wiese wrote:
hi matthias,
whats the reason for this line of code: "session = request.getSession(true);" after "session.invalidate();" ??
regards rico
Matthias Wessendorf <[EMAIL PROTECTED]> schrieb am 15.02.2005 08:57:25:
I guess you'll need something like:
<snip>
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)FacesContext.
getCurrentInstance().getExternalContext().getRequest();
javax.servlet.http.HttpSession session = request.getSession(); session.invalidate(); session = request.getSession(true); </snip>
HTH, Matthias
Slawek wrote:
hi
problem: user cliks on menu with action logout...
how to clear all memory associated with his session (for ex. large
beans)?
i can get session in action method:
FacesContext facesContext = FacesContext.getCurrentInstance();
SessionMap session = (SessionMap)facesContext.getExternalContext().getSessionMap();
//session=null; - that doesnt clear session:/
and what should i do to clear memory (set null references to tell garbage collector to whipe out objects without waiting when session expires)?
thanks for your time Men!
Slawek
-- Matthias We�endorf Aechterhoek 18 DE-48282 Emsdetten Germany phone: +49-2572-9170275 cell phone: +49-179-1118979 email: matzew AT apache DOT org url: http://www.wessendorf.net callto://mwessendorf (Skype) icq: 47016183
-- Matthias We�endorf Aechterhoek 18 DE-48282 Emsdetten Germany phone: +49-2572-9170275 cell phone: +49-179-1118979 email: matzew AT apache DOT org url: http://www.wessendorf.net callto://mwessendorf (Skype) icq: 47016183

