Stopping a backend process if user closes the browser window
jasdeep parmar
Greenhorn
Joined: Oct 06, 2008
Posts: 20
posted
0
hi,
I take the user input from UI in a jsp page and send the info to server, retrieve the data and generate a PDF file on the server and send that as temp file for user to be able to view it.
Now if the user closes the browser I need to stop the processing of the data in back end also
can any one please suggest how can I do that or find info to do that..
You could try using a session listener, assuming you have a link between the session and the process. You could also have a periodic Ajax call made from your page and if it stops being made the process ends.
jasdeep parmar
Greenhorn
Joined: Oct 06, 2008
Posts: 20
posted
0
hi,
I dont' have link between session and process.
I don't have much experience with Ajax either, can you suggest how it can be implemented or where I can find similar
implementations or something that give me an idea as how to implement that..