|
|||||||||
| Home >> All >> org >> mortbay >> jetty >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mortbay.jetty.servlet
Class Dispatcher

java.lang.Objectorg.mortbay.jetty.servlet.Dispatcher
- All Implemented Interfaces:
- javax.servlet.RequestDispatcher
- public class Dispatcher
- extends java.lang.Object
- implements javax.servlet.RequestDispatcher
- extends java.lang.Object
Servlet RequestDispatcher.
- Version:
- $Id: Dispatcher.java,v 1.65 2003/10/16 23:48:36 gregwilkins Exp $
| Nested Class Summary | |
(package private) class |
Dispatcher.DispatcherRequest
|
(package private) class |
Dispatcher.DispatcherResponse
|
private class |
Dispatcher.DontCloseServletOut
|
private class |
Dispatcher.DontCloseWriter
|
| Field Summary | |
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
|
static java.lang.String |
__FORWARD_SERVLET_PATH
|
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
|
static java.lang.String |
__INCLUDE_SERVLET_PATH
|
static org.mortbay.util.StringMap |
__managedAttributes
|
(package private) ServletHolder |
_holder
|
(package private) java.lang.String |
_pathInContext
|
(package private) java.lang.String |
_pathSpec
|
(package private) java.lang.String |
_query
|
(package private) ServletHandler |
_servletHandler
|
(package private) java.lang.String |
_uriInContext
|
(package private) static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
(package private) |
Dispatcher(ServletHandler servletHandler,
java.lang.String name)
Constructor. |
(package private) |
Dispatcher(ServletHandler servletHandler,
java.lang.String uriInContext,
java.lang.String pathInContext,
java.lang.String query,
java.util.Map.Entry entry)
Constructor. |
| Method Summary | |
(package private) void |
dispatch(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
int filterType)
|
(package private) void |
error(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
|
void |
forward(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. |
void |
include(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
Includes the content of a resource (servlet, JSP page, HTML file) in the response. |
boolean |
isNamed()
|
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
log
static org.apache.commons.logging.Log log
__INCLUDE_REQUEST_URI
public static final java.lang.String __INCLUDE_REQUEST_URI
- See Also:
- Constant Field Values
__INCLUDE_CONTEXT_PATH
public static final java.lang.String __INCLUDE_CONTEXT_PATH
- See Also:
- Constant Field Values
__INCLUDE_SERVLET_PATH
public static final java.lang.String __INCLUDE_SERVLET_PATH
- See Also:
- Constant Field Values
__INCLUDE_PATH_INFO
public static final java.lang.String __INCLUDE_PATH_INFO
- See Also:
- Constant Field Values
__INCLUDE_QUERY_STRING
public static final java.lang.String __INCLUDE_QUERY_STRING
- See Also:
- Constant Field Values
__FORWARD_REQUEST_URI
public static final java.lang.String __FORWARD_REQUEST_URI
- See Also:
- Constant Field Values
__FORWARD_CONTEXT_PATH
public static final java.lang.String __FORWARD_CONTEXT_PATH
- See Also:
- Constant Field Values
__FORWARD_SERVLET_PATH
public static final java.lang.String __FORWARD_SERVLET_PATH
- See Also:
- Constant Field Values
__FORWARD_PATH_INFO
public static final java.lang.String __FORWARD_PATH_INFO
- See Also:
- Constant Field Values
__FORWARD_QUERY_STRING
public static final java.lang.String __FORWARD_QUERY_STRING
- See Also:
- Constant Field Values
__managedAttributes
public static final org.mortbay.util.StringMap __managedAttributes
_servletHandler
ServletHandler _servletHandler
_holder
ServletHolder _holder
_pathSpec
java.lang.String _pathSpec
_uriInContext
java.lang.String _uriInContext
_pathInContext
java.lang.String _pathInContext
_query
java.lang.String _query
| Constructor Detail |
Dispatcher
Dispatcher(ServletHandler servletHandler, java.lang.String uriInContext, java.lang.String pathInContext, java.lang.String query, java.util.Map.Entry entry) throws java.lang.IllegalStateException
- Constructor.
/** Constructor.
Dispatcher
Dispatcher(ServletHandler servletHandler, java.lang.String name) throws java.lang.IllegalStateException
- Constructor.
| Method Detail |
isNamed
public boolean isNamed()
include
public void include(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws javax.servlet.ServletException, java.io.IOException
- Description copied from interface:
javax.servlet.RequestDispatcher - Includes the content of a resource (servlet, JSP page,
HTML file) in the response. In essence, this method enables
programmatic server-side includes.
The javax.servlet.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 javax.servlet.ServletRequestWrapper or javax.servlet.ServletResponseWrapper classes that wrap them.
- Specified by:
includein interfacejavax.servlet.RequestDispatcher
forward
public void forward(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws javax.servlet.ServletException, java.io.IOException
- Description copied from interface:
javax.servlet.RequestDispatcher - Forwards a request from
a servlet to another resource (servlet, JSP file, or
HTML file) on the server. This method allows
one servlet to do preliminary processing of
a request and another resource to generate
the response.
For a
RequestDispatcherobtained viagetRequestDispatcher(), theServletRequestobject has its path elements and parameters adjusted to match the path of the target resource.forwardshould 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 anIllegalStateException. 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 javax.servlet.ServletRequestWrapper or javax.servlet.ServletResponseWrapper classes that wrap them.
- Specified by:
forwardin interfacejavax.servlet.RequestDispatcher
error
void error(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws javax.servlet.ServletException, java.io.IOException
dispatch
void dispatch(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, int filterType) throws javax.servlet.ServletException, java.io.IOException
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> org >> mortbay >> jetty >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.mortbay.jetty.servlet.Dispatcher