|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pajes.servlet.RequestRedirector
public class RequestRedirector
An object that receives requests from the client and redirects them to any
resource (such as a servlet, HTML file, or JSP file) within this context.
Unlike the servlet container RequestDispatcher object, which
is used as a wrapper around a server resource located at a particular path or
given by a particular name, the RequestRedirector sends a
redirect instruction back to the client, rather than the content of the
requested resource.
Note that as the request is being redirected, the forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) and
include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) methods perform exactly the same function.
| Constructor Summary | |
|---|---|
RequestRedirector(java.lang.String path)
Creates a RequestRedirector object that will redirect the request to the resource located at the given path. |
|
RequestRedirector(URI path)
Creates a RequestRedirector object that will redirect the request to the resource located at the given path. |
|
| Method Summary | |
|---|---|
void |
forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Sends a redirect instruction to the client to pass a request from a servlet to another resource (servlet, JSP file, or HTML file) within this context. |
void |
include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Sends a redirect instruction to the client to pass a request from a servlet to another resource (servlet, JSP file, or HTML file) within this context. |
java.lang.String |
toString()
Over-rides Object.toString to return the path of this
redirector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RequestRedirector(java.lang.String path)
path - the pathname to the resource. If the path begins with a "/",
it is interpreted as relative to the context root.public RequestRedirector(URI path)
path - the URI of the resource.| Method Detail |
|---|
public void forward(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
forward must be called before any response has been
committed to the client.
The request and response parameters must be the same objects as were passed to the calling servlet's service method.
forward in interface javax.servlet.RequestDispatcherrequest - a HttpServletRequest object that represents the request the
client makes of the servletresponse - a HttpServletResponse object that represents the response the
servlet returns to the client
javax.servlet.ServletException
java.io.IOException
public void include(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
forward must be called before any response has been
committed to the client.
The request and response parameters must be the same objects as were passed to the calling servlet's service method.
include in interface javax.servlet.RequestDispatcherrequest - a ServletRequest object that represents the request
the client makes of the servletresponse - a ServletResponse object that represents the response
the servlet returns to the client
javax.servlet.ServletException
java.io.IOExceptionpublic java.lang.String toString()
Object.toString to return the path of this
redirector.
toString in class java.lang.Object
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||