Java Reference
In-Depth Information
The ServletRequest Interface
public interface ServletRequest
The ServletRequest interface defines an object used to encapsulate information about the
client's request. Information in the ServletRequest object includes parameter name/value
pairs, attributes, and an input stream. The ServletRequest interface defines the following
methods to access this information.
The getAttribute() Method
public java.lang.Object getAttribute(java.lang.String name)
The getAttribute() method returns the value of the object keyed by the name string for the
current request. getAttribute() throws no exceptions.
It has one parameter:
It returns this value:
The getAttributeNames() Method
public java.util.Enumeration getAttributeNames()
The getAttributeNames() method returns an enumeration containing the names of all the
attributes in the current request. getAttributeNames() has no parameters and throws no
It returns this value:
The getCharacterEncoding() Method
public java.lang.String getCharacterEncoding()
The getCharacterEncoding() method returns a string representing the character set encoding
for this request. getCharacterEncoding() has no parameters and throws no exceptions.
It returns this value:
The getContentLength() Method
public int getContentLength()
Search WWH ::

Custom Search