Hey all,
I have a very strange problem and expecting to receive your answer very urgent...
I have a class in my package named MyPackage on my tomcat server. I am using one method of this class, which is very time consuming, as follows in my jsp page...
HeavyClass hc = new HeavyClass();
hc.methodLongTimeExecution();
once I press submit button in my jsp page, it will start execution of this method on the server, and will execute for longer time. meanwhile, as this process is very timeconsuming, when a user clicks Stop button, my browser will stop responding, but the execution of the method will still continue on my Tomcat Server. Now, because, this method execution requires very heavy memory as well as it takes very long time, what I want is, whenever a person clicks a stop button of browser, it should also stop the execution of that method on my remote tomcat server.
Can anyone guide me how can I do this???
or also, guide me about what I should do if I want to put my own button to stop the execution, and how can stop execution of the method on click of that button...
I need the answer very urgently...
Kindly reply soon,
Thanking you,
Nihar.