Attributes are objects associated with a request. Attributes may be set by the container to express information that otherwise could not be expressed via the API, or may be set by a servlet to communicate information to another servlet (via RequestDispatcher ). Attributes are accessed with the following methods of the ServletRequest interface:
Only one attribute value may be associated with an attribute name . Attribute names beginning with the prefixes " java." and " javax. " are reserved for definition by this specification. Similarly, attribute names beginning with the prefixes " sun." and " com.sun. " are reserved for definition by Sun Microsystems. It is suggested that all attributes placed into the attribute set be named in accordance with the reverse package name convention suggested by the Java Programming Language Specification [1] for package naming.
|