|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.servlet Interface ServletConfig
- All Known Implementing Classes:
- GenericServlet, HttpServlet
public interface ServletConfig
Implemented by:
GenericServlet
servlet 容器使用的 servlet 配置对象,该对象在初始化期间将信息传递给 servlet。
A servlet configuration object used by a servlet container to pass information to a servlet during initialization.
Method Summary | |
---|---|
String |
getInitParameter(String name)
Returns a String containing the value of the
named initialization parameter, or null if
the parameter does not exist. |
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 a reference to the ServletContext in which the caller
is executing. |
String |
getServletName()
Returns the name of this servlet instance. |
Method Detail |
---|
public String
getServletName()
返回此 servlet 实例的名称。该名称可能是通过服务器管理提供的,在 Web 应用程序部署描述符中分配,或者对于未注册(和未命名)的 servlet 实例,该名称将是该 servlet 的类名称。
return | servlet 实例的名称 |
getServletName
String getServletName()
- Returns the name of this servlet instance.
The name may be provided via server administration, assigned in the
web application deployment descriptor, or for an unregistered (and thus
unnamed) servlet instance it will be the servlet's class name.
- Returns:
- the name of the servlet instance
public ServletContext
getServletContext()
返回对调用者在其中执行操作的 ServletContext
的引用。
return |
一个 ServletContext 对象,调用者用于与其 servlet 容器交互 |
See also | javax.servlet.ServletContext |
getServletContext
ServletContext getServletContext()
- Returns a reference to the
ServletContext
in which the caller is executing. - Returns:
- a
ServletContext
object, used by the caller to interact with its servlet container - See Also:
ServletContext
public String
getInitParameter(String name)
返回包含指定初始化参数的值的 String
,如果参数不存在,则返回 null
。
name |
指定初始化参数名称的 String |
return |
包含初始化参数值的 String |
getInitParameter
String getInitParameter(String name)
- Returns a
String
containing the value of the named initialization parameter, ornull
if the parameter does not exist. - Parameters:
name
- aString
specifying the name of the initialization parameter- Returns:
- a
String
containing the value of the initialization parameter
public java.util.Enumeration<E>
getInitParameterNames()
以 String
对象的 Enumeration
的形式返回 servlet 的初始化参数的名称,如果 servlet 没有初始化参数,则返回一个空的 Enumeration
。
return |
包含 servlet 初始化参数名称的 String 对象的 Enumeration |
getInitParameterNames
Enumeration getInitParameterNames()
- Returns the names of the servlet's initialization parameters
as an
Enumeration
ofString
objects, or an emptyEnumeration
if the servlet has no initialization parameters. - Returns:
- an
Enumeration
ofString
objects containing the names of the servlet's initialization parameters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!