René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

The ServletContext interface

The ServletContext must be provided by the Servlet Container.
The Servlet uses the ServletContext for logging, obtaining URL references to resources, and set/get attributes.

Methods

getInitParameter

A servlet can use this method to access context initialization parameters found in the deployment descriptor.

getInitParameterNames

setAttribute

getAttribute

getAttributeNames

removeAttribute

getResource

getResourceAsStream

getResourcePaths

Context attributes

Any attribute set into a context is available to any other servlet within the same web application.