For every request separate theread is creating in the servlet engine. I want to kill the thread on second request. Actually my requirement is like this.
One process is running in jsp. There is provision to cancel the running process. While i am cancelling the process its stopping the process. But the counter in the server is still exist. While displaying that counter in the second process is giving random numbers. Can anybody help it out?
For every request separate theread is creating in the servlet engine. I want to kill the thread on second request.
Threads are managed in a Thread pool by the servlet container, you should not try to "kill" them. If you want to stop processing of a request, just close the output stream and execute a return. That hands control of the Thread back to the container. Bill
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop