• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet Thread Killing.  RSS feed

 
Bikash Krishna Mohapatra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!