com.caucho.server.webapp
Class RequestDispatcherImpl

java.lang.Object
  extended by com.caucho.server.webapp.RequestDispatcherImpl
All Implemented Interfaces:
RequestDispatcher

public class RequestDispatcherImpl
extends java.lang.Object
implements RequestDispatcher


Field Summary
 
Fields inherited from interface javax.servlet.RequestDispatcher
ERROR_EXCEPTION, ERROR_EXCEPTION_TYPE, ERROR_MESSAGE, ERROR_REQUEST_URI, ERROR_SERVLET_NAME, ERROR_STATUS_CODE, FORWARD_CONTEXT_PATH, FORWARD_PATH_INFO, FORWARD_QUERY_STRING, FORWARD_REQUEST_URI, FORWARD_SERVLET_PATH, INCLUDE_CONTEXT_PATH, INCLUDE_PATH_INFO, INCLUDE_QUERY_STRING, INCLUDE_REQUEST_URI, INCLUDE_SERVLET_PATH
 
Method Summary
 void dispatch(ServletRequest request, ServletResponse response)
           
 void dispatchResume(HttpServletRequest request, HttpServletResponse response, Invocation invocation)
          Dispatch the async resume request to the servlet named by the request dispatcher.
 void dispatchResume(ServletRequest request, ServletResponse response)
           
 void error(ServletRequest request, ServletResponse response)
           
 void forward(ServletRequest request, ServletResponse response)
          Forwards the request to another page.
 void forward(ServletRequest topRequest, ServletResponse topResponse, java.lang.String method, Invocation invocation, DispatcherType type)
          Forwards the request to the servlet named by the request dispatcher.
 Invocation getAsyncInvocation()
           
 void include(ServletRequest request, ServletResponse response)
          Includes the result of another page.
 void include(ServletRequest topRequest, ServletResponse topResponse, java.lang.String method)
          Include a request into the current page.
 boolean isModified()
           
 void setLogin(boolean isLogin)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setLogin

public void setLogin(boolean isLogin)

isModified

public boolean isModified()

getAsyncInvocation

public Invocation getAsyncInvocation()

forward

public void forward(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    java.io.IOException
Description copied from interface: RequestDispatcher
Forwards the request to another page. Forward may not be called if data has been sent to the client. Specifically, forward calls the response.reset() method to clear the output buffer.

Query parameters are added to the original query parameters.

The new URI values are based on the RequestDispatcher URI. So getRequestURI(), getServletPath(), and getPathInfo() will reflect the request dispatcher URI.

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

dispatchResume

public void dispatchResume(ServletRequest request,
                           ServletResponse response)
                    throws ServletException,
                           java.io.IOException
Throws:
ServletException
java.io.IOException

error

public void error(ServletRequest request,
                  ServletResponse response)
           throws ServletException,
                  java.io.IOException
Throws:
ServletException
java.io.IOException

dispatch

public void dispatch(ServletRequest request,
                     ServletResponse response)
              throws ServletException,
                     java.io.IOException
Throws:
ServletException
java.io.IOException

forward

public void forward(ServletRequest topRequest,
                    ServletResponse topResponse,
                    java.lang.String method,
                    Invocation invocation,
                    DispatcherType type)
             throws ServletException,
                    java.io.IOException
Forwards the request to the servlet named by the request dispatcher.

Parameters:
topRequest - the servlet request.
topResponse - the servlet response.
method - special to tell if from error.
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 result of another page.

Query parameters are added to the original query parameters.

The included request's URI methods reflect the original URI data. So getRequestURI() will return the URI sent by the browser.

Included pages should use request.getAttribute() to get the new URI values:

getRequestURIjavax.servlet.include.request_uri
getContextPathjavax.servlet.include.context_path
getServletPathjavax.servlet.include.servlet_path
getPathInfojavax.servlet.include.path_info
getQueryStringjavax.servlet.include.query_string

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

include

public void include(ServletRequest topRequest,
                    ServletResponse topResponse,
                    java.lang.String method)
             throws ServletException,
                    java.io.IOException
Include a request into the current page.

Throws:
ServletException
java.io.IOException

dispatchResume

public void dispatchResume(HttpServletRequest request,
                           HttpServletResponse response,
                           Invocation invocation)
                    throws ServletException,
                           java.io.IOException
Dispatch the async resume request to the servlet named by the request dispatcher.

Parameters:
request - the servlet request.
response - the servlet response.
invocation - current invocation
Throws:
ServletException
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object