wood burning stoves 2.0*
The moose likes Servlets and the fly likes How servlet container maintain threads 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 "How servlet container maintain threads" Watch "How servlet container maintain threads" New topic
Author

How servlet container maintain threads

Gaurav Agarwal
Greenhorn

Joined: Oct 13, 2004
Posts: 18
How servlet container maintain more than one request through threads? How many object of servlet are created?

Thanks in advance




Gaurav Agarwal
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41150
    
  45
Each servlet is only instantiated once. But the container allocates a new thread for each incoming request, and inside the thread calls the servlet's service method.


Ping & DNS - my free Android networking tools app
Gaurav Agarwal
Greenhorn

Joined: Oct 13, 2004
Posts: 18
Hi,

Thanks for your response,

Request you to kindly elaborate the hole process once again so i can understand it more clearly.


Gaurav Agarwal
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

That's a tall order.
Maybe too tall for a web forum.

In my signature, there is a link to the servlet specification.
It's an easy read and should answer all of your questions.

-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Consider Paul's rocket mass heater.
 
subject: How servlet container maintain threads
 
Similar Threads
How servlet process multiple request.
servlet to another client
servlet container and multi threading
Advise - Servlet + Understanding Thread and Instance
Servlet instantiation