A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Tomcat: getActiveSessions, getSessionParams(sID) -> How?
Joined: Apr 29, 2002
Nov 12, 2004 04:09:00
I lost some hours to find a solution, finally it would be great if you could help me.
I found out how to store sessionIDs with a SessionListener.
However, later when I request them I want to get each user's session data for each running session.
Vector sessionIDs = tomcat.getSessions();
for (int s=0; s<sessionIDs.size(); s++)
sessionID = (String) session.IDs.get(s);
usersession = tomcat.getSession(sessionID );
System.out.println("username: " + (String)usersession.getAttribute("username")):
Is this possible?
I read someting about a StandardManager and the method findSession ... well, but don�t get it ... how do I get the right (actual) instance for this manager?
Maybe someone can help me,
that would be great.
Joined: Feb 20, 2001
Nov 12, 2004 23:16:00
Rather than going through tomcat-specific classes, how about storing a reference to the Session object, while in your session listener.
So don't just store the ID, which you'd then use to retrieve (through tomcat-specific stuff, the
just store the
I agree. Here's the link:
subject: Tomcat: getActiveSessions, getSessionParams(sID) -> How?
distinguishing 2 browsers in the same session.
Lost Session at JWSP-Client
Problem with session context.(Urgent)
Getting Date & Time from the SessoinID
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015