|
It depends on the Configuration which we did in the web.xml.
If we put load on startup tag inside web.xml and if we mention the
particular servlet inside this tag, at the time of server startup, web -
container will load the servlet class into the memory, and webcontainer
will create the servlet instance by calling the default
constructor. After that container will initialize this servlet by calling init()
method. So All initialization code we can put inside init tag inside the
web.xml, get the ServletConfig Object. These properties of the servlet
will be shared among the clieants.
|