How will web server contacts container's DD (xml file) when it gets a request from a user. becase the only contact point to browser is web server (Apache). I mean is there any configuration set in web server which tells to goto some directory under some path and pick up "web.xml" of container and read all the servlets mentioned there?
And yes, each server that implements the Servlet specification will have a means to configure the various contexts (web applications) each of which has their own deployment descriptor.
Joined: Aug 17, 2006
Yes, I agreed your point. I meant Tomcat in last post. One more thing Boss.
As per documents which I read I understood when user requests a HTTP request, apache "http"(not web) server will check for static page(if asked for static) or asks servlet container (tomcat) for the requested servlet(if asked for servlet). Then container will check for the servlet in DD and see if there is a class loaded already. If yes , it creates a new thread and invokes service method, which calls "our servlet code's" (which we wrote) doGet or doPost method. If class is not loaded it calls init() of our servlet code and creates instance of new servlet ( from now onwards new threads will be created from next requests on wards).
Am I correct?. Plese correct me if I am wrong.As its base for servlets I shd know things clearly.