|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.grizzly.http.servlet.RequestDispatcherImpl
public final class RequestDispatcherImpl
Standard implementation of RequestDispatcher that allows a
request to be forwarded to a different resource to create the ultimate
response, or to include the output of another resource in the response
from this resource. This implementation allows application level servlets
to wrap the request and/or response objects that are passed on to the
called resource, as long as the wrapping classes extend
javax.servlet.ServletRequestWrapper and
javax.servlet.ServletResponseWrapper.
| Constructor Summary | |
|---|---|
RequestDispatcherImpl(ServletAdapter wrapper,
String requestURI,
String servletPath,
String pathInfo,
String queryString,
String name)
Construct a new instance of this class, configured according to the specified parameters. |
|
| Method Summary | |
|---|---|
void |
dispatch(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
com.sun.grizzly.http.servlet.DispatcherConstants.DispatcherType dispatcherType)
Dispatches the given request and response to the resource for which this dispatcher was acquired. |
void |
forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Forwards the given request and response to the resource for which this dispatcher was acquired. |
void |
include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Include the response from another resource in the current response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestDispatcherImpl(ServletAdapter wrapper,
String requestURI,
String servletPath,
String pathInfo,
String queryString,
String name)
null, it will be assumed that this RequestDispatcher
was acquired by name, rather than by path.
wrapper - The Wrapper associated with the resource that will
be forwarded to or included (required)requestURI - The request URI to this resource (if any)servletPath - The revised servlet path to this resource (if any)pathInfo - The revised extra path information to this resource
(if any)queryString - Query string parameters included with this request
(if any)name - Servlet name (if a named dispatcher was created)
else null| Method Detail |
|---|
public void forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
IOException
Any runtime exceptions, IOException, or ServletException thrown by the target will be propogated to the caller.
forward in interface javax.servlet.RequestDispatcherrequest - The request to be forwardedresponse - The response to be forwarded
IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs
public void dispatch(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
com.sun.grizzly.http.servlet.DispatcherConstants.DispatcherType dispatcherType)
throws javax.servlet.ServletException,
IOException
Any runtime exceptions, IOException, or ServletException thrown by the target will be propogated to the caller.
request - The request to be forwardedresponse - The response to be forwardeddispatcherType - The type of dispatch to be performed
IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs
IllegalArgumentException - if the dispatcher type is different
from FORWARD, ERROR, and ASYNC
public void include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
IOException
include in interface javax.servlet.RequestDispatcherrequest - The servlet request that is including this oneresponse - The servlet response to be appended to
IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||