Name
config
Synopsis
|
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 the servlet or JSP page belongs to.
Interface Declaration
public interface ServletConfig {
public String getInitParameter(String name);
public Enumeration getInitParameterNames( );
public ServletContext getServletContext( );
public String getServletName( );
}Methods
-
public String getInitParameter(String name) Returns a
Stringcontaining the value of the specified servlet or JSP page initialization parameter, ornullif the parameter does not exist.-
public java.util.Enumeration getInitParameterNames( ) Returns the names of the servlet’s or JSP page’s initialization parameters as an
EnumerationofStringobjects, or an emptyEnumerationif the servlet has no initialization parameters.-
public ServletContext getServletContext( ) Returns a reference to the
ServletContextthat the servlet or JSP page belongs to.-
public String getServletName( ) Returns the name of the servlet instance or JSP page. The name may be assigned in the web application deployment descriptor. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access