Interface java.servlet.ServletRequest
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface java.servlet.ServletRequest

public interface ServletRequest
extends Object

Method Index

 o getContentLength()
Returns the size of the request entity data, or -1 if not known.
 o getContentType()
Returns the Internet Media Type of the request entity data, or null if not known.
 o getInputStream()
Returns an input stream for reading the request body.
 o getParameter(String)
Returns the value of the specified parameter for the request.
 o getParameters()
Returns a Hashtable of all the parameters of this request.
 o getProtocol()
Returns the protocol and version of the request as a string of the form <protocol>/<major version>.<minor version>.
 o getRemoteAddr()
Returns the IP address of the agent that sent the request.
 o getRemoteHost()
Returns the fully qualified host name of the agent that sent the request.
 o getServerName()
Returns the host name of the server that received the request.
 o getServerPort()
Returns the port number on which this request was received.

Methods

 o 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.
 o 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.
 o 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.
 o getServerName
  public abstract String getServerName()
Returns the host name of the server that received the request. Same as the CGI variable SERVER_NAME.
 o getServerPort
  public abstract int getServerPort()
Returns the port number on which this request was received. Same as the CGI variable SERVER_PORT.
 o getRemoteAddr
  public abstract String getRemoteAddr()
Returns the IP address of the agent that sent the request. Same as the CGI variable REMOTE_ADDR.
 o 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.
 o getInputStream
  public abstract ServletInputStream getInputStream()
Returns an input stream for reading the request body.
 o 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
 o getParameters
  public abstract Hashtable getParameters()
Returns a Hashtable of all the parameters of this request.

All Packages  Class Hierarchy  This Package  Previous  Next  Index