Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Servlet Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::ServletResponse

Package:  Servlet


Base Class

Local Index

Members

Header File

#include <rwsf/servlet/ServletResponse.h>

Description

rwsf::ServletResponse encapsulates a response to a client. For each request, the Agent creates an instance of this object and passes the instance to the servlet's service() method. Each response object contains an output buffer that holds the response payload. The methods in this class allow a servlet to access and set buffer information.

To write to the output buffer, either set the payload directly using setPayload() or construct an rwsf::ServletOutputStream via getOutputStream() or getWriter(). To get a copy of the contents of the output buffer, use the getPayload() function.

Table 9 lists methods that are either non-standard or not supported at this release.

Table 9: rwsf::ServletResponse deviation from Servlet Specification 

Member Description of Difference from Servlet Specification

appendPayload()

added method

getCharacterEncoding()

not supported in this release.

getLocale()

not supported in this release.

getPayload()

added method.

setLocale()

not supported in this release.

setPayload()

added method

Public Constructors

ServletResponse();

Public Destructor

virtual
~ServletResponse();

Public Member Functions

void
appendPayload(const std::string& data);
virtual void
flushBuffer();

NOTE -- If the request was received through the HTTP connector, flushBuffer() does not transmit the content to the client.
rwsf::ServletOutputStream&
getOutputStream();
std::string
getPayload() const;
rwsf::ServletOutputStream&
getWriter();
bool
isCommitted() const;
void
reset();
void
resetBuffer();
virtual void
setContentLength(int len);
virtual void
setContentType(const std::string& type);
void
setPayload(const std::string& payload);

See Also

rwsf::HttpServletResponse



Previous fileTop of DocumentContentsIndex pageNext file

©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.