Interface java.servlet.ServletRequest
All Packages Class Hierarchy This Package Previous Next Index
Interface java.servlet.ServletRequest
- public interface ServletRequest
- extends Object
-
getContentLength()
- Returns the size of the request entity data, or -1 if not known.
-
getContentType()
- Returns the Internet Media Type of the request entity data, or
null if not known.
-
getInputStream()
- Returns an input stream for reading the request body.
-
getParameter(String)
- Returns the value of the specified parameter for the request.
-
getParameters()
- Returns a Hashtable of all the parameters of this request.
-
getProtocol()
- Returns the protocol and version of the request as a string of the
form <protocol>/<major version>.<minor version>.
-
getRemoteAddr()
- Returns the IP address of the agent that sent the request.
-
getRemoteHost()
- Returns the fully qualified host name of the agent that sent the
request.
-
getServerName()
- Returns the host name of the server that received the request.
-
getServerPort()
- Returns the port number on which this request was received.
getContentLength
public abstract int getContentLength()
- Returns the size of the request entity data, or -1 if not known.
Same as the CGI variable CONTENT_LENGTH.
getContentType
public abstract String getContentType()
- Returns the Internet Media Type of the request entity data, or
null if not known. Same as the CGI variable CONTENT_TYPE.
getProtocol
public abstract String getProtocol()
- Returns the protocol and version of the request as a string of the
form <protocol>/<major version>.<minor version>.
Same as the CGI variable SERVER_PROTOCOL.
getServerName
public abstract String getServerName()
- Returns the host name of the server that received the request.
Same as the CGI variable SERVER_NAME.
getServerPort
public abstract int getServerPort()
- Returns the port number on which this request was received.
Same as the CGI variable SERVER_PORT.
getRemoteAddr
public abstract String getRemoteAddr()
- Returns the IP address of the agent that sent the request.
Same as the CGI variable REMOTE_ADDR.
getRemoteHost
public abstract String getRemoteHost()
- Returns the fully qualified host name of the agent that sent the
request. Same as the CGI variable REMOTE_HOST.
getInputStream
public abstract ServletInputStream getInputStream()
- Returns an input stream for reading the request body.
getParameter
public abstract String getParameter(String name)
- Returns the value of the specified parameter for the request. For
example, in an HTTP servlet this would return the value of the
specified query string parameter.
- Parameters:
- name - the parameter name
getParameters
public abstract Hashtable getParameters()
- Returns a Hashtable of all the parameters of this request.
All Packages Class Hierarchy This Package Previous Next Index