perry arora
Posts: 22
Nickname: perry
Registered: Sep, 2003
|
|
Re: ServletConfig
|
Posted: Oct 22, 2003 4:53 AM
|
|
sure!!!
First of all are your aware of what the servlet container is .. if yes then great
But quickly i will explaion when ever you host your application in any server , the server needs specific particular containers to suppot that technology like
Servlets(also jsp),J2ee containers,Applet Containers etc etc
The one most important function of the Container is to provide an environment in which the servlet can perform it task
with that the its the responsibility of the container to give access to few resources needed by the Software component running in it , in this case it will be Servlet.
and any interactiong with out side world! lets say the underlying OS will be done by container which is running for this Servelt. We can have more than one Servlet running in one container!!!
Now coming to the ServletConfig.. as we know that what ever servlets we develop they are being loaded by the server or lets say they are being instantiated , the object is created for it.. and The container that instantiates want to give some information to the servlet about itself..or about container it does that in the form of ServletConfig
Each and every Servlet has its own separate Copy of ServletConfig
Hey dont confuse it with ServletContext that can be shared by the servlets in the application!
So basically this ServletConfig which the container passes to the created Servelt instance includes the intialization of the Servers part and also some information about the container so that if needed the servlet can communicate back with the Container !
I hope it will help u .. if u need any other details abt Conntainers or Context object feel free!
bye
|
|