In Servlets we have ServletConfig and ServletContext. Going through the API i see that both are interfaces. Following are my doubts
1.ServletConfig and ServletContext are interfaces, how are these object created if they are interfaces?
2.Is that the classes of the container implements these interfaces and provide the implementation?
3.Where can i find the instantiation code of ServletConfig and ServletContext?
4.When exactly are the ServletConfig and ServletContext created.
Also i read that there is SerlvetContextListener and it has methods context Created() and contextDestroyed(). And these methods are called when the server is started. Is that how we can come to know that ServletContext object is created ?. Just reading the book is not giving me clear picture about ServletConfig and ServletContext. Want to know the code how these are created.Can someone please explain or provide links so that i can go through and get a clear picture