javax.servlet
Interface ServletConfig

All Known Implementing Classes:
GenericServlet

public abstract interface ServletConfig

Defines an object that a servlet engine generates to pass configuration information to a servlet when such servlet is initialized. The configuration information that this servlet will have access to is a set of name/value pairs that describe initialization parameters and the ServletContext object which describes the context within which the servlet will be running.


Method Summary
 java.lang.String getInitParameter(java.lang.String name)
          Returns a string containing the value of the named initialization parameter of the servlet, or null if the parameter does not exist.
 java.util.Enumeration getInitParameterNames()
          Returns the names of the servlet's initialization parameters as an enumeration of strings, or an empty enumeration if there are no initialization parameters.
 ServletContext getServletContext()
          Returns the ServletContext for this servlet.
 

Method Detail

getServletContext

public ServletContext getServletContext()
Returns the ServletContext for this servlet.

getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Returns a string containing the value of the named initialization parameter of the servlet, or null if the parameter does not exist. Init parameters have a single string value; it is the responsibility of the servlet writer to interpret the string.
Parameters:
name - the name of the parameter whose value is requested

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Returns the names of the servlet's initialization parameters as an enumeration of strings, or an empty enumeration if there are no initialization parameters.