posted 24 years ago
Defines a set of methods that a servlet uses to communicate with a servlet engine, for example, to get the MIME type of a file, locate other servlets running on the server, or write to a servlet log file.
The servlet engine talks to the servlet by returning a ServletContext object (defined by this interface) that gives servlets information about their environment. Servlets use the ServletConfig.getServletContext() method to get the ServletContext object.
If the server supports multiple or virtual hosts, the ServletContext object must be at least as unique as the host. Servlet engines can also create ServletContext objects that are unique to a group of servlets and are tied to a specific part of the host's URL namespace. You can assign this grouping administratively or define it in a deployment descriptor file.
The ServletContext object is contained within the ServletConfig object, which the Web server provides the servlet when the servlet is initialized. You can access the ServletConfig object by using the Servlet.getServletConfig() method.
------------------
I.K.VISHWANATH