Attributes
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 the RequestDispatcher). Attributes are accessed with the following methods of the
ServletRequest interface:
=> getAttribute
=> getAttributeNames
=> setAttribute
Only one attribute value may be associated with an attribute name.
Attribute names beginning with the prefixes of “java.” and “javax.” are reserved for definition by this specification. Similarly, attribute names beginning with the prefixes of “sun.”, and “com.sun.” are reserved for definition by Sun Microsystems. It is suggested that all attributes placed in the attribute set be named in accordance with the reverse domain name convention suggested by the Java Programming Language Specification1 for package naming.
=> getAttribute
=> getAttributeNames
=> setAttribute
Only one attribute value may be associated with an attribute name.
Attribute names beginning with the prefixes of “java.” and “javax.” are reserved for definition by this specification. Similarly, attribute names beginning with the prefixes of “sun.”, and “com.sun.” are reserved for definition by Sun Microsystems. It is suggested that all attributes placed in the attribute set be named in accordance with the reverse domain name convention suggested by the Java Programming Language Specification1 for package naming.
No comments:
Post a Comment