What's true about the lifecycle of a
servlet? (Choose all that apply.)
A. The service() method is the first method invoked by the container when a new request is received.
B. The service() method is invoked by either doPost() or doGet() after they have completed a request.
C. Each time that doPost() is invoked, it runs in its own
thread.
D. The destroy() method is invoked after every invocation of doGet() completes.
E. The container issues a separate thread for each client request.
HFSJ 2nd edition question 43 answer
Now the option C has been marked correct by the book, I have seen this is previous posts but they did not clear my doubt about Option C.
From what I know when a new request comes in container creates a new thread and calls service, the service figures out that we have to call doPost/doGet etc. and calls it by that thread only.
So the request thread is shared by doPost and service methods and doPost thus does not have an exclusive thread.
So option C must be wrong.