javax.servlet
Interface ServletConfig

All Known Implementing Classes:
GenericServlet

public abstract interface ServletConfig

Defines a servlet configuration object, which a servlet engine uses to pass information to a servlet in order to initialize the servlet.

The configuration information contains initialization parameters, which are a set of name/value pairs, and a ServletContext object, which gives the servlet information about the server.

Version:
$Version$
Author:
Various
See Also:
ServletContext

Method Summary
 java.lang.String getInitParameter(java.lang.String name)
          Returns a String containing the value of the named initialization parameter, 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 String objects, or an empty Enumeration if the servlet has no initialization parameters.
 ServletContext getServletContext()
          Returns the ServletContext object that the server has passed to this servlet.
 

Method Detail

getServletContext

public ServletContext getServletContext()
Returns the ServletContext object that the server has passed to this servlet. The ServletContext object is part of the ServletConfig object this interface defines.
Returns:
a ServletContext object, which gives the servlet information about how to interact with the server
See Also:
ServletContext

getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.

The value of an initialization parameter is a single String, which you must interpret.

Parameters:
name - a String containing the name of the parameter whose value is requested
Returns:
a String representing the value of the parameter

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.
Returns:
an Enumeration of String objects containing the names of the servlet's initialization parameters