>> I tried with setting the window.location property, but didnt worked.
>> Plus i tried with <BODY> tag, but the problem is the MyUnload() is
>> called, but the form submit or servlet redirection is not
>> happening... ???
>>
>> <BODY onbeforeunload='MyUnLoad()'>
>>
>> I will make my problem more clearer...
>> I want whenever a browser window is closed a servlet should be
>> called which does some cleaning-up/post processing operation... !!
>[ ... ]

>This has come up a hundred times before -- check the archives.  Bottom
>line, it can't be done 100% reliably, so you're going to need to rely
>on a timeout mechanism.

Hundreds of times with no 100� reliable solution proposed, I agree.

However, the argument are always the same, stating that HTTP protocole
doesn't allow for this.
What we have to do is just to build over HTTP an addtionnal layer that does
the job. This can be done by including in the generated HTML a component
that will keep permanent contact with the server through HTTP. Of course,
"permanent" means only at regular interval, such as 20 secondes (or whatever
you want). On the server side, you just have to monitor the requests from
that component. If the requests stop to reach the server, it means that the
client has gone. It works event in case of a client crash or power down.
It's 100% reliable, but it has two drawbacks : wasting bandwith and
excluding clients which can't or doesn't want to handle your component. Such
component can be a java applet or a Flash movie.

Pierre-Yves

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to