what is web container?

Servlet do not have a main method. They are under the control of another java application called container. When the web server gets a request for a servlet then server hands the request not to servlet directly but to the container where the servlet is deployed.
Container has the overall role in servlet’s life. It creates the request response objects, create or allocate thread for the servlet, calls the service() method etc.

The container finds the correct servlet based on the URL in the request, and creates or allocates a thread for the request and calls the service() method, passing the request and response objects as arguments. The service() method process the request and the response goes back to the client through container. The service() method completes, so the thread dies or returns to the container managed thread pool.

3 comments:

  1. The best argument against democracy is a five-minute conversation with the average voter. See the link below for more info.


    #arguments
    www.ufgop.org

    ReplyDelete
  2. Time is gold. We should treasure every second of it so that in time we will not regret anything because we only live ones.I have read your article and i was glad and inspired. Thanks for it, Cheers!
    Visit my site if you have time, Enjoy.

    n8fan.net

    www.n8fan.net

    ReplyDelete
  3. I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very
    useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


    edupdf.org

    ReplyDelete