Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ServletContext Class Reference

Inheritance diagram for ServletContext:

AdminContext List of all members.

Public Member Functions

 this (char[] name)
 this (char[] name, char[] basePath)
char[] getName ()
synchronized Dictionary getAttributes ()
synchronized Dictionary getConfiguration ()
int getMajorVersion ()
int getMinorVersion ()
char[] getMimeType (char[] ext)
FileConduit getResourceAsFile (char[] path)
ServletContext log (char[] msg)
ServletContext log (char[] msg, Object error)
char[] getServerInfo ()
ServletContext checkPath (char[] path)

Static Public Member Functions

 this ()

Protected Member Functions

synchronized ServletContext setAttributes (MutableDictionary other)
synchronized ServletContext setConfiguration (MutableDictionary other)

Private Attributes

char[] name
char[] basePath
MutableDictionary attributes
MutableDictionary configuration

Static Private Attributes

Logger logger
ServletException irp
MutableDictionary mimeMap
const char[] ServerIdentity = "Mango.Servlet/Beta 9"
const MimeMap list []

Detailed Description

Provided equivalent functionality of the Java class by the same name.

Definition at line 56 of file ServletContext.d.


Member Function Documentation

this  )  [inline, static]
 

Initialize the mime-map and the servlet logging instance

Definition at line 186 of file ServletContext.d.

References Logger::getLogger(), irp, list, mimeMap, Dictionary::optimize(), and MutableDictionary::put().

this char[]  name  )  [inline]
 

Construct a context with the given name, and a base-path of the current working directory.

Definition at line 208 of file ServletContext.d.

this char[]  name,
char[]  basePath
[inline]
 

Construct a context with the given name, and the specified base-path. The latter is where files and properties will be located from. .

Definition at line 221 of file ServletContext.d.

References basePath.

char [] getName  )  [inline]
 

Return the name of this context.

Definition at line 246 of file ServletContext.d.

Referenced by ServletRequest::getContextPath(), and ServletRequest::getPathInfo().

synchronized Dictionary getAttributes  )  [inline]
 

Return the attributes of this context

Definition at line 257 of file ServletContext.d.

References attributes.

synchronized Dictionary getConfiguration  )  [inline]
 

Return the current configuration of this context

Definition at line 268 of file ServletContext.d.

synchronized ServletContext setAttributes MutableDictionary  other  )  [inline, protected]
 

Swizzle the attributes of this context. This is not to be exposed publicly.

Definition at line 280 of file ServletContext.d.

References attributes.

synchronized ServletContext setConfiguration MutableDictionary  other  )  [inline, protected]
 

Swizzle the configuration of this context. This is not to be exposed publicly.

Definition at line 293 of file ServletContext.d.

int getMajorVersion  )  [inline]
 

Return the major version number.

Definition at line 305 of file ServletContext.d.

int getMinorVersion  )  [inline]
 

Return the minor number.

Definition at line 316 of file ServletContext.d.

char [] getMimeType char[]  ext  )  [inline]
 

Return the mime type for a given file extension. Returns null if the extension is not known.

Definition at line 328 of file ServletContext.d.

References Dictionary::get(), and mimeMap.

Referenced by ServletResponse::copyFile().

FileConduit getResourceAsFile char[]  path  )  [inline]
 

Return a FileConduit for the given path. The file is located via the base-path.

Throws an IOException if the path is invalid, or there's a problem of some kind with the file.

Definition at line 343 of file ServletContext.d.

References basePath, checkPath(), and FileConduit.

Referenced by ServletResponse::copyFile().

ServletContext log char[]  msg  )  [inline]
 

Send an informational message to the logger subsystem

Definition at line 355 of file ServletContext.d.

References Logger::info().

ServletContext log char[]  msg,
Object  error
[inline]
 

Send a error message to the logger subsystem

Definition at line 367 of file ServletContext.d.

References Logger::error().

char [] getServerInfo  )  [inline]
 

Return the identity of this server

Definition at line 379 of file ServletContext.d.

References ServerIdentity.

ServletContext checkPath char[]  path  )  [inline]
 

Check the given path to see if it tries to subvert the base-path notion. Throws an IOException if anything dodgy is noted.

Definition at line 392 of file ServletContext.d.

References irp.

Referenced by getResourceAsFile().


Member Data Documentation

char [] name [private]
 

Definition at line 58 of file ServletContext.d.

char [] basePath [private]
 

Definition at line 58 of file ServletContext.d.

Referenced by getResourceAsFile(), and this().

MutableDictionary attributes [private]
 

Definition at line 60 of file ServletContext.d.

Referenced by getAttributes(), and setAttributes().

MutableDictionary configuration [private]
 

Definition at line 60 of file ServletContext.d.

Logger logger [static, private]
 

Definition at line 63 of file ServletContext.d.

ServletException irp [static, private]
 

Definition at line 65 of file ServletContext.d.

Referenced by checkPath(), and this().

MutableDictionary mimeMap [static, private]
 

Definition at line 67 of file ServletContext.d.

Referenced by getMimeType(), and this().

const char [] ServerIdentity = "Mango.Servlet/Beta 9" [static, private]
 

Definition at line 69 of file ServletContext.d.

Referenced by getServerInfo().

const MimeMap list[] [static, private]
 

Initial value:

 
        [
        {"a",           "application/octet-stream"}

Definition at line 80 of file ServletContext.d.

Referenced by this().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:10 2004 for Mango by doxygen 1.3.6