This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Bear Bibeault wrote:
Ummmm, yeah, they are. What did you think they were?
Thanks Bear Bibeault! I found that, they(servlet) also, a object, and when a request come to a particular servlet, the container creates a Thread, and the Thread will communicate with the servlet, this from Head First JSP ans Servlet book, but I didn't noticed any Thread when the application is running? Is it implicitly functioning?
One responsibility of the container (among several others) is the Thread Management. The container (eg: Tomcat) will maintain a pool of Thread objects or create new Threads as and when needed. In the case of new servlet request comes in from user, it will either create a new Thread or assign a Thread from the Thread pool to serve this request! Container will call the start() method.