javax.servlet
Interface RequestDispatcher
public interface RequestDispatcher
Defines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server. The servlet container creates the RequestDispatcher
object, which is used as a wrapper around a server resource located at a particular path or given by a particular name.
定义一个对象,接收来自客户端的请求,并将它们发送给服务器上的任意资源(如servlet、HTML文件或JSP文件)。servlet容器创建RequestDispatcher对象,用作位于特定路径或由特定名称给定的服务器资源的包装器。
This interface is intended to wrap servlets, but a servlet container can create RequestDispatcher
objects to wrap any type of resource.
该接口旨在包装servlet,但servlet容器可以创建RequestDispatcher对象来包装任何类型的资源。
Version:
$Version$
Author:
Various
See Also:
ServletContext.getRequestDispatcher(java.lang.String), ServletContext.getNamedDispatcher(java.lang.String), ServletRequest.getRequestDispatcher(java.lang.String)
Method Summary | |
void |
将来自servlet的请求转发到服务器上的另一个资源(servlet、JSP文件或HTML文件) |
void | include(ServletRequest request, ServletResponse response) Includes the content of a resource (servlet, JSP page, HTML file) in the response. |