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

rwsf::ServletContext

Package:  Servlet


rwsf::ServletContext rwsf::HandleBase

Local Index

Members

Header File

#include <rwsf/servlet/ServletContext.h>

Description

rwsf::ServletContext represents the web application context. The Agent constructs a single context object for each web application. Each context object contains application-wide initialization parameters, information about the deployment environment, and a collection of attributes. A context also provides factory methods for creating request dispatchers to redirect requests. A context can retrieve other context objects held by the server so objects in different applications can cooperate.

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

Table 7: rwsf::ServletContext deviation from Servlet Specification

Member Description of Difference from Servlet Specification

getRequestDispatcher()

Accepts an HTTP URL. This is an extension to the specification.

getResource()

Not included in this implementation. Use getResourceData() from rwsf::ServletContext instead.

getResourceData()

HydraExpress added this method as a safer alternative for C++ than the getResourceAsStream() method.

getResourceAsStream()

Not included in this implementation. Use getResourceData() from rwsf::ServletContext instead.

Public Constructors

ServletContext();
ServletContext(const rwsf::ServletContext& second);

Public Destructor

~ServletContext();

Public Member Operators

rwsf::ServletContext&
operator=(const rwsf::ServletContext& second);

Public Member Functions

rwsf::Attribute
getAttribute(const std::string& name) const;
rwsf::Enumeration<std::string>
getAttributeNames() const;
rwsf::ServletContext 
getContext(const std::string& uriPath) const;
std::string
getContextPath() const;
std::string 
getInitParameter(const std::string& name) const;
rwsf::Enumeration<std::string> 
getInitParameterNames() const;
int 
getMajorVersion() const;
std::string 
getMimeType(const std::string& fileName) const;
int 
getMinorVersion() const;
rwsf::RequestDispatcher 
getNamedDispatcher(const std::string& name) const;
std::string 
getRealPath(const std::string& path) const;
rwsf::RequestDispatcher 
getRequestDispatcher(const std::string& path) const;
std::string 
getResourceData(const std::string& path) const;
rwsf::Enumeration<std::string>
getResourcePaths() const;
std::string 
getServerInfo() const;
std::string 
getServletContextName() const;
void 
log(const std::string& msg) const;
void 
log(const std::string& msg, const rwsf::Exception& e) const;
rwsf::Attribute
removeAttribute(const std::string& name);
void 
setAttribute(const std::string& name,
             const rwsf::Attribute& value);
void
setSessionTimeout(long timeout);

See Also

rwsf::ServletContextAttributeListener



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.