NAME

Wombat::Core::RequestDispatcher - request dispatcher implementation

SYNOPSIS

DESCRIPTION

Implementation of Servlet::RequestDispatcher that allows a request to be forwardd to a different resource to create a response, or to include the output of another resource in the response from this resource.

CONSTRUCTOR

new($wrapper)

Construct and return an instance, initializing fields appropriately.

Parameters:

$wrapper

the Wombat::Core::Wrapper associated with the resource being dispatched to

PUBLIC METHODS

forward($request, $response)

Forward the specified Request and Response to another resource for processing. Any exception thrown by the called servlet will be propagated to the caller.

Parameters:

$request

the Servlet::ServletRequest to be forwarded

$response

the Servlet::ServletResponse to be forwarded

Throws:

Servlet::ServletException

if a servlet exception occurs

Servlet::Util::IllegalStateException

if the response has already been committed

Servlet::Util::IOException

if an input or output exception occurs

include($request, $response)

Include the Response from another resource in the current Response. Any exception thrown by the called servlet will be propagated to the caller.

Parameters:

$request

the Servlet::ServletRequest to be included

$response

the Servlet::ServletResponse to be included

Throws:

Servlet::ServletException

if a servlet exception occurs

Servlet::Util::IOException

if an input or output exception occurs

SEE ALSO

Servlet::RequestDispatcher, Servlet::ServletRequestWrapper, Servlet::ServletResponseWrapper, Wombat::Core::Application

AUTHOR

Brian Moseley, bcm@maz.org