Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
The ServletConfig interface can also be implemented by servlets. (GenericServlet does this.) When implemented by a servlet, the methods in the interface make getting the configuration data more convenient. For example, a servlet could implement getServletContext by writing,
public ServletContext getServletContext() { return getServletConfig().getServletContext(); }making access to the servlet's context object a single method invocation (a call to
getServletContext()
).
Method Summary | |
String | getInitParameter(String name)
|
Enumeration | getInitParameterNames()
|
ServletContext | getServletContext()
|
Method Detail |
public ServletContext getServletContext()
public String getInitParameter(String name)
name
- the name of the parameter whose value is requested
public Enumeration getInitParameterNames()
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |