|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.jetty.servlet.Dispatcher
Servlet RequestDispatcher.
Field Summary | |
static int |
__ALL
|
static int |
__DEFAULT
Dispatch types |
static int |
__ERROR
|
static int |
__FORWARD
|
static java.lang.String |
__FORWARD_CONTEXT_PATH
|
static java.lang.String |
__FORWARD_PATH_INFO
|
static java.lang.String |
__FORWARD_QUERY_STRING
|
static java.lang.String |
__FORWARD_REQUEST_URI
Dispatch include attribute names |
static java.lang.String |
__FORWARD_SERVLET_PATH
|
static int |
__INCLUDE
|
static java.lang.String |
__INCLUDE_CONTEXT_PATH
|
static java.lang.String |
__INCLUDE_PATH_INFO
|
static java.lang.String |
__INCLUDE_QUERY_STRING
|
static java.lang.String |
__INCLUDE_REQUEST_URI
Dispatch include attribute names |
static java.lang.String |
__INCLUDE_SERVLET_PATH
|
static StringMap |
__managedAttributes
|
static int |
__REQUEST
|
Method Summary | |
void |
forward(ServletRequest servletRequest,
ServletResponse servletResponse)
Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. |
void |
include(ServletRequest servletRequest,
ServletResponse servletResponse)
Includes the content of a resource (servlet, JSP page, HTML file) in the response. |
boolean |
isNamed()
|
java.lang.String |
toString()
|
static int |
type(java.lang.String type)
Dispatch type from name |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int __DEFAULT
public static final int __REQUEST
public static final int __FORWARD
public static final int __INCLUDE
public static final int __ERROR
public static final int __ALL
public static final java.lang.String __INCLUDE_REQUEST_URI
public static final java.lang.String __INCLUDE_CONTEXT_PATH
public static final java.lang.String __INCLUDE_SERVLET_PATH
public static final java.lang.String __INCLUDE_PATH_INFO
public static final java.lang.String __INCLUDE_QUERY_STRING
public static final java.lang.String __FORWARD_REQUEST_URI
public static final java.lang.String __FORWARD_CONTEXT_PATH
public static final java.lang.String __FORWARD_SERVLET_PATH
public static final java.lang.String __FORWARD_PATH_INFO
public static final java.lang.String __FORWARD_QUERY_STRING
public static final StringMap __managedAttributes
Method Detail |
public boolean isNamed()
public void include(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, java.io.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.
include
in interface RequestDispatcher
servletRequest
- a ServletRequest
object
that contains the client's requestservletResponse
- a ServletResponse
object
that contains the servlet's response
java.io.IOException
- if the included resource throws this exception
ServletException
- if the included resource throws this exceptionpublic void forward(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, java.io.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.
forward
in interface RequestDispatcher
servletRequest
- a ServletRequest
object
that represents the request the client makes of the servletservletResponse
- a ServletResponse
object
that represents the response the servlet returns to the client
ServletException
- if the target resource throws this exception
java.io.IOException
- if the target resource throws this exceptionpublic java.lang.String toString()
public static int type(java.lang.String type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |