javax.servlet.ServletConfig翻译

来源:互联网 发布:网络与信息期刊 编辑:程序博客网 时间:2024/04/30 04:05

Overview Package  Class Tree Deprecated Index Help JavaTM 2 Platform
Ent. Ed. v1.4
 PREV CLASS   NEXT CLASSFRAMES    NO FRAMES     All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD



javax.servlet
Interface ServletConfig

All Known Implementing Classes:
GenericServlet

public interface ServletConfig

A servlet configuration object used by a servlet container to pass information to a servlet during initialization. 一个servlet配置对象,在初始化过程中由servlet容器传递信息给servlet。


Method Summary StringgetInitParameter(String name)
          Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.返回命名的初始化参数的对应值,如果参数不存在返回null。
 EnumerationgetInitParameterNames()
          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.返回以String对象的Enumeration形式的servlet初始化参数名称,如果servlet不含初始化参数,返回一个空Enumeration。
 ServletContextgetServletContext()
          Returns a reference to the
ServletContext in which the caller is executing. 返回调用者正在执行的ServletContext的引用。 StringgetServletName()
          Returns the name of this servlet instance. 返回servlet实例的名称。
 

Method Detail

getServletName

public 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. 返回servlet实例的名称。该名称可以由服务器管理员提供,在web应用部署描述符中赋值, 如果未注册或未命名,servlet实例将是servlet的类名。

Returns:
the name of the servlet instance servlet实例的名称

getServletContext

public ServletContext getServletContext()
Returns a reference to the ServletContext in which the caller is executing. 返回调用者正在执行的ServletContext的引用。

Returns:
a ServletContext object, used by the caller to interact with its servlet container 由调用者和servlet容器交互的对象
See Also:
ServletContext

getInitParameter

public String getInitParameter(String name)
Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist. 返回命名的初始化参数的对应值,如果参数不存在返回null。

Parameters:
name - a String specifying the name of the initialization parameter 指定初始化参数名称的String
Returns:
a String containing the value of the initialization parameter 初始化参数的对应String值

getInitParameterNames

public 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. 返回以String对象的Enumeration形式的servlet初始化参数名称,如果servlet不含初始化参数,返回一个空Enumeration。

Returns:
an Enumeration of String objects containing the names of the servlet's initialization parameters 包含servlet初始化参数的String对象的枚举

Overview Package  Class Tree Deprecated Index Help JavaTM 2 Platform
Ent. Ed. v1.4
 PREV CLASS   NEXT CLASSFRAMES    NO FRAMES     All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD


Submit a bug or feature


Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.

原创粉丝点击