GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SERVLET::REQUESTDISPATCHER (3)

.ds Aq ’

NAME

Servlet::RequestDispatcher - request dispatcher interface

CONTENTS

SYNOPSIS



  $dispatcher->forward($request, $response);

  $dispatcher->include($request, $response);



DESCRIPTION

A request dispatcher receives requests from the client and sends them to any resource (such as a servlet or HTML file) on the server. The servlet container creates the <B>Servlet::RequestDispatcherB> object, which is used as a wrapper around a server resource located at a given path or by a particular name.

This interface is intended to wrap servlets, but a servlet container can create dispatcher objects to wrap any type of resource.

METHODS

forward($request, $response) Forwards a request from a servlet to another resource on the server. This method allows one servlet to do preliminary processing of a request and another resource to generate the response.

For an object obtained via getRequestDispatcher(), the <B>Servlet::ServletRequestB> object has its path elements and parameters adjusted to match the path of the target resource.

This method 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 a <B>Servlet::Util::IllegalStateExceptionB>. Uncommitted output in the response buffer is automatically cleared before the forward.

<B>Parameters:B>
$request the <B>Servlet::ServletRequestB> object that contains the client’s request
$response the <B>Servlet::ServletResponseB> object that contains the servlet’s response

<B>Throws:B>
<B>Servlet::ServletExceptionB> if the target resource throws this exception
<B>Servlet::Util::IllegalStateExceptionB> if the response has already been committed

include($request, $response) Includes the content of a resource in the response. In essence, this method enables programmatic server-side includes.

The <B>Servlet::ServletResponseB> object’s 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.

<B>Parameters:B>
$request the <B>Servlet::ServletRequestB> object that contains the client’s request
$response the <B>Servlet::ServletResponseB> object that contains the servlet’s response

<B>Throws:B>
<B>Servlet::ServletExceptionB> if the target resource throws this exception

SEE ALSO

Servlet::ServletException, Servlet::ServletRequest, Servlet::ServletResponse, Servlet::Util::Exception

AUTHOR

Brian Moseley, bcm@maz.org
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SERVLET::REQUESTDISPATCHER (3) 2001-07-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.