Do sessionListeners reside in a different context from other servlets?
I'm trying to create a session listener that stores the sessions in a context scoped
Object.
For some reason, other servlets can't seem to access the the object.
/**
* Adds a reference to the new session to the activeUsersList
*/
public void sessionCreated(HttpSessionEvent event){
HttpSession session = event.getSession();
ServletContext context = session.getServletContext();
Hashtable activeUserList = (Hashtable)context.getAttribute("activeUserList");
if(activeUserList == null){
activeUserList = new Hashtable();
}
activeUserList.put(session.getId(), session);
context.setAttribute("activeUserList", activeUserList);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]