I have one quick question on Container concept. On page 42 (HeadFirst Servlets & JSP book), talking about containers it was written like, once the request comes from the client container creates a HttpServletRequest and HttpServletResponse objects and those acts as a reference for the clients request and response. After that container creates a thread for that servlet and passes these request and response objects to the thread and calls the service method. Here i'm not able to understand who will call the threads start method and what will be the code in the created thread's run() method .
Code example for that thread class will be very helpful.
The most important thing is that you don't have to worry about how it's done. That's the beauty of having the container - some of the work is already done for you and you don't have to care how it works internally. You only need to know how it works on the surface and how to interact with it.
A good workman is known by his tools.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database