Hi all,
Am after some help with a chat application I am building. Basically I am having real problems with showing a list of all the users currently logged in. Currently I have a bean for each user that is then also added to an application session bean which shows all the users, I have run into big problems though trying to remove a user from this application session bean should a user just close their browser so I think I'm going back to the drawing board.
What is the best way for coding this ? I was thinking maybe, use a
servlet to 'log' a user in, create a bean for them and then add that bean to a bean containing a list of all the users, I could then use the session listener to keep check of when a user disconnects and the remove that user from the list of logged on users ? Would the bean containing the list of users be available for all the users to see ?
I'm sure this must of been done before and I've searched and searched but I'm really looking for a definitive guide as to how I should approach this whole thing before I jump in and start trying to code it all again.
Any ideas or input very gratefully received.
Jon