This used to be possible via the HttpSessionContext object, but was
deprecated with version 2.1 of the Servlet API. This ability was removed for
security reasons: you would not want an arbitrary servlet author to be able
to gain access to potentially sensitive information stored in your session
attributes; not to mention that gaining access to a list of all the session
IDs could enable someone to impersonate a client with a valid session ID.

If you want to share data between servlets, you should consider using the
ServletContext to set/get attributes:

Servlet1:

   getServletContext().setAttribute("mykey", myObject);

Sevlet2:

   Object o = getServletContext().getAttribute("mykey");

Hope this helps,

Karl Moss
Allaire, Corp.

-----Original Message-----
From: Scott Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 23, 2000 9:18 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Implicit session object question


Is there a way to get say, an enumeration, of all the current session 
objects in the jsp container?  In other words, if there are currently 500 
users of the site and they all have session objects can I get an array of 
references to all 500 of those objects?

We are wanting to keep some user specific info in these objects and then be 
able to get to that data for all users of the system from a seperate admin 
tool - to track performance and stuff.

We are using JRun 3.0 on Solaris 5.6.
Thanks for any help you can provide.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

----------------------------------------------------------------------------
--
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to