Hello Ravi,
I am also looking for the same query. If you get answer please do help me too.
for this nodoubt we have to use javascript since window event cannot be handled by jsp or servlet. So, what we need is to establish communication between client programming (
java script) and server programming (jsp etc). Answer is provided bye AJAX technology, which allows client program to communicate with server programming objects.
I have no idea about AJAX, if you find something reply back.
Regards
Ashish