I’m trying to understand how webcontainer work for the http request and sent back response and I’m stuck in middle
- Clients submits a http request
- Web server receives the http request and hand over to webcontainer
- Webcontainer converts the http request to ServletRequest object and empty ServletResponse object
- Webcontainer will allocate one thread from thread pool per request
I got stuck here The thread will call service(req,res)inside the run method of thread and service method’s return type is void. The service method will call dopost or doget method based on the client submitted. How the thread will get the response object back which was constructed from void doGet(req,res).
Thanks in Advance