We have a jsp page that each time it takes a couple of minutes to processing large amount of data. So we expect the server to stop processing when user closes the window, hits Esc key or clicks Stop button in IE so that the server won't be overloaded. It is a popup window though. So when user closes the window, the session has not expired and we cannot achieve this by checking session. The same page works fine in OC4J but not in Tomcat or Jboss. I tried to put code 'out.print(" "); out.flush();' and it does not work. What else can I do?