org.mortbay.jetty.servlet
Class Dispatcher

java.lang.Object
  |
  +--org.mortbay.jetty.servlet.Dispatcher
All Implemented Interfaces:
RequestDispatcher

public class Dispatcher
extends java.lang.Object
implements RequestDispatcher

Servlet RequestDispatcher.

Version:
$Id: Dispatcher.java,v 1.2 2001/09/25 23:16:29 gregwilkins Exp $
Author:
Greg Wilkins (gregw)

Field Summary
static java.lang.String __CONTEXT_PATH
           
static java.lang.String __PATH_INFO
           
static java.lang.String __QUERY_STRING
           
static java.lang.String __REQUEST_URI
           
static java.lang.String __SERVLET_PATH
           
 
Method Summary
 void forward(ServletRequest request, ServletResponse response)
          Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server.
 void include(ServletRequest request, ServletResponse response)
          Includes the content of a resource (servlet, JSP page, HTML file) in the response.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__REQUEST_URI

public static final java.lang.String __REQUEST_URI

__SERVLET_PATH

public static final java.lang.String __SERVLET_PATH

__CONTEXT_PATH

public static final java.lang.String __CONTEXT_PATH

__QUERY_STRING

public static final java.lang.String __QUERY_STRING

__PATH_INFO

public static final java.lang.String __PATH_INFO
Method Detail

forward

public void forward(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    java.io.IOException
Description copied from interface: 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 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 the same objects as were passed to the calling servlet's service method.

Specified by:
forward in interface RequestDispatcher
Parameters:
request -  
response -  
Throws:
ServletException -  
java.io.IOException -  

include

public void include(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    java.io.IOException
Description copied from interface: 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 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 the same objects as were passed to the calling servlet's service method.

Specified by:
include in interface RequestDispatcher
Parameters:
request -  
response -  
Throws:
ServletException -  
java.io.IOException -  


Copyright © 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.