This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Multithreading in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Multithreading in servlet" Watch "Multithreading in servlet" New topic

Multithreading in servlet

Sudhakar Reddy Kurakula
Ranch Hand

Joined: Aug 19, 2006
Posts: 42
How does Servlet supports Multithreading?
I told that internally container will extend the Thread class.
is it correct or not?
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Nov 29, 2005
Posts: 2308
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.

Rahul Bhattacharjee
LinkedIn - Blog
I agree. Here's the link:
subject: Multithreading in servlet
Similar Threads
multithreading in servlet
Which part of Java is sexy for you?
Servlets MultiThreading
Multithreading in Servlets
how should the optimized DAOs used in Stateless Session Bean look like?