Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multithreading in servlet

 
Sudhakar Reddy Kurakula
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does Servlet supports Multithreading?
I told that internally container will extend the Thread class.
is it correct or not?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically the container will manage a pool of worker threads, that is it will create a bunch of thread ready to do work and then assign work to them as needed. It will then reuse the recovered thread for a new job later on. I'm not really sure what the question is.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the request is received by the container then it creates a request and response objects and set appropriate value from the HTTP request to the request and then hands over to the request processing thread for further processing.Therefore the server's request processing is multithreaded.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic