This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi I want a user to be authenticated only once.So i create a session and set a flag when he logs in.The next time when he login a message is thrown.I invalidate the session and reset the flag when he logs out.I have set a max inactive interval for the session to be 10 mins.Now here is the probs.I want to reset the flag when the session expires.How this can be done.Help in this. Wishes Saravanan.V
You don't mention where that flag is being set. But it may be useful to know that if you create a session-scoped JavaBean that implements HttpSessionBindingListener, its valueUnbound() method gets called when the session expires. That should give you the hook you need to do whatever needs doing. - Peter [This message has been edited by Peter den Haan (edited November 12, 2001).]
Joined: Sep 20, 2001
Hi Peter Thanx for Ur Reply.Anyway i set the flag in the database. I used a class that implements the HttpSessionBindingListener interface and the valueBound() method and valueUnbound() seems to be called when u bind the object to the class(by session.putValue()) and unbind the object(by session.removeValue()).This is where the problem is.When logout i am removing the value which unsets the flag in database..but thatz the not the case when session expires as i dont call removeValue().Hope the problem is more clearer now.. Wishes Saravanan.V