In my jsf application i am making use of richfaces 3.. i track the user logged in and store the user-agent, user id and ip of the logged in system. this is done to prevent the user to login with same browser again with out loggin out. These details are stored in a map when the user loggs in and when user loggs out the entry for that user is removed from the map.. but if the sesssion expires i am not able to remove the user from the map as i am handling session expire with web.xml using the following code:
and in sessionExpired.jsp i am just redirecting the user to login page and here i will not be able to access any bean as the session is expired. so when session expires the user is blocked from loggin in again in same browser. i don't want this to happen. i want to remove the entry of the user from the map. how can this be done?
Is the map has stored in HttpSession object? ( hope so). If it is then create a class which implements HttpSessionListener and have you logic of inserting entry of logged user and remove entry in respective methods of sessionCreated() and sessionDestroyed(). It will work. Hope this will solve your problem.
No pain, No gain.
OCJP 1.6, Liferay Certified Developer 6.1