Sun Java System Web Server - on Browsers refresh/ back button eventterminate user session

I have a problem pls help me to solve this.

Requirement is :

I need to catch browser'srefresh back button event.

Actually I need to terminate his session/login

when user clicks on browser's refresh button

and send user on Login page something like banking application(e.g. ICICI Bank) when u logged in ICICI bank side in between if u click on browser's refreshit shows message "Your session terminated "something like that.

So i want same functinality after user click on Refresh terminate his session

[564 byte] By [SanjayKaradea] at [2007-11-26 23:30:57]
# 1
You should concider using javascript for that. Specifically you can implement the onload, and onunload events and do what you wish there.
Sultala at 2007-7-10 14:42:26 > top of Java-index,Web & Directory Servers,Web Servers...
# 2
in my page i am inserting new data and updating existing dataso for inserting data againe page get submitted so for inserrion time alos these onload & Onunload events get fired i tried this but still proble is unsolved..give some more ways to solve
SanjayKaradea at 2007-7-10 14:42:26 > top of Java-index,Web & Directory Servers,Web Servers...