rwsf::RequestDispatcher rwsf::HandleBase
#include <rwsf/servlet/RequestDispatcher.h>
rwsf::RequestDispatcher forwards requests to other resources within the Agent or to a remote HTTP resource. Instances of this class are created by the Agent. The getNamedDispatcher() and getRequestDispatcher() functions of class rwsf::ServletContext provide access to rwsf::RequestDispatcher objects.
NOTE -- This implementation supports dispatching to other servlets in the same Agent and dispatching to HTTP resources. Direct dispatch to servlets in another Agent is not supported.
RequestDispatcher();
Creates an empty, invalid request dispatcher. Use the copy constructor or assignment operator to create a valid request dispatcher.
RequestDispatcher(const rwsf::RequestDispatcher& second);
Attaches to and increments the reference count on second's body.
~RequestDispatcher();
Detaches from the current body (if any), decrements the reference count of the body, and deletes the body if there are no other references.
rwsf::RequestDispatcher& operator=(const rwsf::RequestDispatcher& second);
Detaches from the current body (if any), decrements the reference count of the current body, deletes the current body if there are no other references, and then attaches to second's body and increments the reference count of second's body.
void forward(rwsf::ServletRequest& request, rwsf::ServletResponse& response);
Forwards request and response to another resource. The other resource can be another servlet within the Agent, a static file in one of the Agent contexts, or a remote resource available through HTTP. Clears the response buffer before forwarding request and response.
void include(rwsf::ServletRequest& request, rwsf::ServletResponse& response);
Includes the response from another resource into the response for this servlet. The other resource can be another servlet within the Agent, a static file in one of the Agent contexts, or a remote resource available through HTTP. Does not clear the response buffer before forwarding request and response.
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.