config  
 
Variable name:

config

 
Interface name:

javax.servlet.ServletConfig

 
Extends:

None

 
Implemented by:

Internal container-dependent class

 
JSP page type:

Available in both regular JSP pages and error pages

 
Description

A ServletConfig instance is used by a web container to pass information to a servlet or JSP page during initialization. The configuration information contains initialization parameters (defined in the web application deployment descriptor) and the ServletContext object representing the web application to which the servlet or JSP page belongs.

getInitParameter()  
public String getInitParameter(String name)

Returns a String containing the value of the specified servlet or JSP page initialization parameter, or null if the parameter does not exist.

getInitParameterNames()  
public java.util.Enumeration getInitParameterNames()

Returns the names of the servlet's or JSP page's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.

getServletContext()  
public ServletContext getServletContext()

Returns a reference to the ServletContext to which the servlet or JSP page belongs.

getServletName()  
public String getServletName()

Returns the name of this servlet instance or JSP page. The name may be assigned in the web application deployment descriptor. For an unregistered (and thus unnamed) servlet instance or JSP page, the servlet's class name is returned.