This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It gets created before the init(ServletConfig) method is called. That's all you need to know. Whether or not it is created before the constructor is called is a meaningless question, because the constructor would not have access to it anyway.
Joined: Sep 03, 2008
Thats what i was confused about..
I am going through the head first book
and i have read the following:
*container reads the dd including the init-params
*then it creates a ServletConfig Object
*then container creates a name-value pair of strings
*It gives the references of the init params to the ServletConfig Object
*the next step comprises of creating a new instance of the servlet class
*servlet calls the init() method passing in the ServletConfig Reference.
so that means before instantiating we have a ServletConfig???