Class sun.server.http.HttpRequest
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.http.HttpRequest

java.lang.Object
   |
   +----sun.server.http.HttpRequest

public class HttpRequest
extends Object
implements HttpServletRequest
This class represents an HTTP request.

Method Index

 o getAuthType()
Returns the access authorization type, or null if none.
 o getContentLength()
Returns the content length for this request, or -1 if not known.
 o getContentType()
Returns the content type for this request, or null if not known.
 o getDateHeader(String, long)
Returns the value of a date header field.
 o getHeader(int)
Returns the value of the nth header field, or null if there are fewer than n fields.
 o getHeader(String)
Returns the value of a header field, or null if not known.
 o getHeaderName(int)
Returns the name of the nth header field, or null if there are fewer than n fields.
 o getInputStream()
Returns the input stream for this request.
 o getIntHeader(String, int)
Returns the value of an integer header field.
 o getMethod()
Returns the request method.
 o getParameter(String)
Returns the query string parameter specified by name, or null if none.
 o getParameters()
Returns a hash table of query string parameter values.
 o getPathInfo()
Returns extra path information, or null if none.
 o getPathTranslated()
Returns extra path information translated, or null if none.
 o getProtocol()
Returns the protocol of the request.
 o getQueryString()
Returns the query string, or null if none.
 o getRemoteAddr()
Returns the IP address of the remote agent, or null if not known.
 o getRemoteHost()
Returns the host name of the remote agent, or null if not known.
 o getRemoteUser()
Returns the user name for this request, or null if not known.
 o getRequestPath()
Returns the full request path (servlet path + path info)
 o getRequestURI()
Returns the full request URI.
 o getServerName()
Returns the host on which this request was received.
 o getServerPort()
Returns the port on which this request was received.
 o getServletPath()
Returns the servlet path.

Methods

 o getMethod
  public String getMethod()
Returns the request method.
 o getRequestURI
  public String getRequestURI()
Returns the full request URI.
 o getRequestPath
  public String getRequestPath()
Returns the full request path (servlet path + path info)
 o getServletPath
  public String getServletPath()
Returns the servlet path.
 o getPathInfo
  public String getPathInfo()
Returns extra path information, or null if none.
 o getPathTranslated
  public String getPathTranslated()
Returns extra path information translated, or null if none.
 o getQueryString
  public String getQueryString()
Returns the query string, or null if none.
 o getParameter
  public String getParameter(String name)
Returns the query string parameter specified by name, or null if none.
Parameters:
name - the parameter name
 o getParameters
  public Hashtable getParameters()
Returns a hash table of query string parameter values.
 o getProtocol
  public String getProtocol()
Returns the protocol of the request.
 o getContentLength
  public int getContentLength()
Returns the content length for this request, or -1 if not known.
 o getContentType
  public String getContentType()
Returns the content type for this request, or null if not known.
 o getRemoteHost
  public String getRemoteHost()
Returns the host name of the remote agent, or null if not known.
 o getRemoteAddr
  public String getRemoteAddr()
Returns the IP address of the remote agent, or null if not known.
 o getRemoteUser
  public String getRemoteUser()
Returns the user name for this request, or null if not known.
 o getAuthType
  public String getAuthType()
Returns the access authorization type, or null if none.
 o getServerPort
  public int getServerPort()
Returns the port on which this request was received.
 o getServerName
  public String getServerName()
Returns the host on which this request was received.
 o getInputStream
  public ServletInputStream getInputStream()
Returns the input stream for this request.
 o getHeader
  public String getHeader(String name)
Returns the value of a header field, or null if not known.
Parameters:
name - the header field name
 o getIntHeader
  public int getIntHeader(String name,
                          int def)
Returns the value of an integer header field.
Parameters:
name - the header field name
def - the value to return if the field is unset or invalid.
 o getDateHeader
  public long getDateHeader(String name,
                            long def)
Returns the value of a date header field.
Parameters:
name - the header field name
def - the value to return if the header is unset or invalid.
 o getHeaderName
  public String getHeaderName(int n)
Returns the name of the nth header field, or null if there are fewer than n fields. This can be used to iterate through all the headers in the message.
 o getHeader
  public String getHeader(int n)
Returns the value of the nth header field, or null if there are fewer than n fields. This can be used to iterate through all the headers in the message.

All Packages  Class Hierarchy  This Package  Previous  Next  Index