title: How to retrieve active sessions in a tomcat instance?
body: <p>I was designated to implement a security requierement to mimic "messenger like" authentication, for example: if a user first logs in, then another user tries to log in with the same username, this new user will be prompted to "kick" the previously loged user and the system should invalidate the first user's web session, the web app is running on tomcat 6, i was taking a look at <a href="http://download.oracle.com/docs/cd/E17802_01/products/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/http/HttpSessionContext.html" rel="nofollow noreferrer">HTTPSessionContext</a> but its now deprecated, is there an alternative or should i go and implement something myself using a <a href="http://download-llnw.oracle.com/javaee/1.4/api/javax/servlet/http/HttpSessionListener.html" rel="nofollow noreferrer">HTTPSessionListener</a> ?</p>