Servlet Config as the name suggests, provides Servlet specific configuration information to a particular servlet. For Example: - the information that u specify in the web.xml file like this
...
Each servlet will have its own servlet config object, which will be specific to that servlet.
ServletContext
--------------
It provides application view to all the servlets. There is one
ServletContext per JVM for one application. It also provides methods to access application wide parameters specified in.... tag in web.xml. These will be accessible to all the servlets.
b. SevletConfig is used to give the information during the initializing period. ServletContext is used for they communication between the servlet and
the servletcontainer thatis to give MIME types. ServletContext is used to access other environments thatis accessing other servlets with in the same server.
ServletContext is used to share all the servlets.In servlet interface we are having the servletcontext and servletconfig within servletconfig we are having servletcontext.
SOURCE : www.referjava.com
No comments:
Post a Comment