|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.server.Dispatcher
public class Dispatcher
Servlet RequestDispatcher.
| 字段摘要 | |
|---|---|
static String |
__FORWARD_PREFIX
Dispatch include attribute names |
static String |
__INCLUDE_PREFIX
Dispatch include attribute names |
static String |
__JSP_FILE
JSP attributes |
| 构造方法摘要 | |
|---|---|
Dispatcher(ContextHandler contextHandler,
String name)
Constructor. |
|
Dispatcher(ContextHandler contextHandler,
String uri,
String pathInContext,
String query)
|
|
| 方法摘要 | |
|---|---|
void |
error(ServletRequest request,
ServletResponse response)
|
void |
forward(ServletRequest request,
ServletResponse response)
Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. |
protected void |
forward(ServletRequest request,
ServletResponse response,
DispatcherType dispatch)
|
void |
include(ServletRequest request,
ServletResponse response)
Includes the content of a resource (servlet, JSP page, HTML file) in the response. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final String __INCLUDE_PREFIX
public static final String __FORWARD_PREFIX
public static final String __JSP_FILE
| 构造方法详细信息 |
|---|
public Dispatcher(ContextHandler contextHandler,
String uri,
String pathInContext,
String query)
contextHandler - uri - pathInContext - query -
public Dispatcher(ContextHandler contextHandler,
String name)
throws IllegalStateException
contextHandler - name -
IllegalStateException| 方法详细信息 |
|---|
public void forward(ServletRequest request,
ServletResponse response)
throws ServletException,
IOException
RequestDispatcher 复制的描述For a RequestDispatcher obtained via
getRequestDispatcher(), the ServletRequest
object has its path elements and parameters adjusted to match
the path of the target resource.
forward should be called before the response has been
committed to the client (before response body output has been flushed).
If the response already has been committed, this method throws
an IllegalStateException.
Uncommitted output in the response buffer is automatically cleared
before the forward.
The request and response parameters must be either the same
objects as were passed to the calling servlet's service method or be
subclasses of the ServletRequestWrapper or
ServletResponseWrapper classes
that wrap them.
This method sets the dispatcher type of the given request to
DispatcherType.FORWARD.
RequestDispatcher 中的 forwardrequest - a ServletRequest object that represents the
request the client makes of the servletresponse - a ServletResponse object that represents
the response the servlet returns to the client
ServletException - if the target resource throws this exception
IOException - if the target resource throws this exceptionServletRequest.getDispatcherType()
public void error(ServletRequest request,
ServletResponse response)
throws ServletException,
IOException
ServletException
IOException
public void include(ServletRequest request,
ServletResponse response)
throws ServletException,
IOException
RequestDispatcher 复制的描述The ServletResponse object has its path elements
and parameters remain unchanged from the caller's. The included
servlet cannot change the response status code or set headers;
any attempt to make a change is ignored.
The request and response parameters must be either the same
objects as were passed to the calling servlet's service method or be
subclasses of the ServletRequestWrapper or
ServletResponseWrapper classes that wrap them.
This method sets the dispatcher type of the given request to
DispatcherType.INCLUDE.
RequestDispatcher 中的 includerequest - a ServletRequest object that contains the
client's requestresponse - a ServletResponse object that contains the
servlet's response
ServletException - if the included resource throws this
exception
IOException - if the included resource throws this exceptionServletRequest.getDispatcherType()
protected void forward(ServletRequest request,
ServletResponse response,
DispatcherType dispatch)
throws ServletException,
IOException
ServletException
IOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||