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

rwsf::HttpServletResponse

Package:  Servlet


rwsf::HttpServletResponse rwsf::ServletResponse

Local Index

Members

Header File

#include <rwsf/servlet/http/HttpServletResponse.h>

Description

rwsf::HttpServletResponse provides an HTTP-specific response object and provides a method for accessing HTTP-specific functionality, such as cookies and HTTP headers. For each request from a client, an HTTP servlet receives an instance of rwsf::HttpServletReponse that represents the response to the request.

Example

Public Enums

SC_ACCEPTED = 202;
SC_BAD_GATEWAY = 502;
SC_BAD_REQUEST = 400;
SC_CONFLICT = 409;
SC_CONTINUE = 100;
SC_CREATED = 201;
SC_EXPECTATION_FAILED = 417;
SC_FORBIDDEN = 403;
SC_GATEWAY_TIMEOUT = 504;
SC_GONE = 410;
SC_HTTP_VERSION_NOT_SUPPORTED = 505;
SC_INTERNAL_SERVER_ERROR = 500;
SC_LENGTH_REQUIRED = 411;
SC_METHOD_NOT_ALLOWED = 405;
SC_MOVED_PERMANENTLY = 301;
SC_MOVED_TEMPORARILY = 302;
SC_MULTIPLE_CHOICES = 300;
SC_NO_CONTENT = 204;
SC_NON_AUTHORITATIVE_INFORMATION = 203;
SC_NOT_ACCEPTABLE = 406;
SC_NOT_FOUND = 404;
SC_NOT_IMPLEMENTED = 501;
SC_NOT_MODIFIED = 304;
SC_OK = 200;
SC_PARTIAL_CONTENT = 206;
SC_PAYMENT_REQUIRED = 402;
SC_PRECONDITION_FAILED = 412;
SC_PROXY_AUTHENTICATION_REQUIRED = 407;
SC_REQUEST_ENTITY_TOO_LARGE = 413;
SC_REQUEST_RANGE_NOT_SATISFIABLE = 416;
SC_REQUEST_TIMEOUT = 408;
SC_REQUEST_URI_TOO_LONG = 414;
SC_RESET_CONTENT = 205;
SC_SEE_OTHER = 303;
SC_SERVICE_UNAVAILABLE = 503;
SC_SWITCHING_PROTOCOLS = 101;
SC_UNAUTHORIZED = 401;
SC_UNSUPPORTED_MEDIA_TYPE = 415;
SC_USE_PROXY = 305;

Public Destructor

virtual 
~HttpServletResponse();

Public Member Functions

void
addCookie(const rwsf::Cookie& cookie);
void
addDateHeader(const std::string& name, const rwsf::DateTime& date);
void
addHeader(const std::string& name, const std::string& value);
void
addIntHeader(const std::string& name, int value);
bool
containsHeader(const std::string& name) const;
std::string
encodeRedirectURL(const std::string& url) const;
std::string
encodeURL(const std::string& url) const;
std::string
getCharacterEncoding() const;
std::string
getContentType() const;
int
getContentLength() const;
void
sendError(int sc);
void
sendError(int sc, const std::string& msg);
void
sendRedirect(const std::string& location);
void
setContentType(const std::string& contentType);
virtual void
setContentLength(int contentLength);
void
setDateHeader(const std::string& name, const rwsf::DateTime& date);
void
setHeader(const std::string& name, const std::string& value);
void
setIntHeader(const std::string& name, int value);
void
setStatus(int sc);

NOTE -- Use the sendError functions for error responses.
void
setStatus(int sc, const std::string& msg);

See Also

rwsf::HttpDate

rwsf::ServletResponse

rwsf::HttpServletRequest



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.