if i am wrong at any of the point just make me correct.as i am new to this servlet section.
what i know about servlet up to this point is the web container while get /sees a request from the client .It creates two objects HTTP request Object(1) and HTTP response Object(2).
Then it creates a thread to the servlet and pass the request object .According to the URL it sees the GET method or POST method then call from service method.
After the Request has been handled the response stored in response Object . the container created thread dies . the response stored in response Object send back to the clients.by making it as HTTP response Object.
I don't know what i understood is correct or not if correct a question arise is when it send the HTTP request and when it send simple request. same about response.
bikasit babu wrote:Then it creates a thread to the servlet and............ the container created thread dies .
Not always. Creating threads is a process-intensive task and it would exhaust the container if it attempts to create thousands of concurrent threads for handling thousands of simultaneous requests. Most of the containers avoid this problem by reusing the threads in thread pools, so a thread that has served a request may remain active for servicing another thread.