Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.mortbay.jetty.servlet.Dispatcher
Field Summary | |
static int | |
static int |
|
static int | |
static int | |
static String | |
static String | |
static String | |
static String |
|
static String | |
static int | |
static String | |
static String | |
static String | |
static String |
|
static String | |
static int | |
static StringMap |
Method Summary | |
void |
|
void |
|
boolean |
|
String |
|
static int |
|
public static final int __ALL
- Field Value:
- 15
public static final int __DEFAULT
Dispatch types
- Field Value:
- 0
public static final int __ERROR
- Field Value:
- 8
public static final int __FORWARD
- Field Value:
- 2
public static final String __FORWARD_CONTEXT_PATH
public static final String __FORWARD_PATH_INFO
public static final String __FORWARD_QUERY_STRING
public static final String __FORWARD_REQUEST_URI
Dispatch include attribute names
public static final String __FORWARD_SERVLET_PATH
public static final int __INCLUDE
- Field Value:
- 4
public static final String __INCLUDE_CONTEXT_PATH
public static final String __INCLUDE_PATH_INFO
public static final String __INCLUDE_QUERY_STRING
public static final String __INCLUDE_REQUEST_URI
Dispatch include attribute names
public static final String __INCLUDE_SERVLET_PATH
public static final int __REQUEST
- Field Value:
- 1
public void forward(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException
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 aRequestDispatcher
obtained viagetRequestDispatcher()
, theServletRequest
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 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 theServletRequestWrapper
orServletResponseWrapper
classes that wrap them.
- Specified by:
- forward in interface RequestDispatcher
- Parameters:
- Throws:
ServletException
- if the target resource throws this exception
public void include(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException
Includes the content of a resource (servlet, JSP page, HTML file) in the response. In essence, this method enables programmatic server-side includes. TheServletResponse
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 theServletRequestWrapper
orServletResponseWrapper
classes that wrap them.
- Specified by:
- include in interface RequestDispatcher
- Parameters:
- Throws:
ServletException
- if the included resource throws this exception
public boolean isNamed()
public String toString()
public static int type(String type)
Dispatch type from name