All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface Acme.Serve.servlet.http.HttpServletRequest

public interface HttpServletRequest
extends ServletRequest
This interface represents an HTTP request.

This is taken from JavaSoft's Servlet API documentation.

Fetch the software.
Fetch the entire Acme package.

See Also:
Servlet

Method Index

 o getAuthType()
Returns the authentication scheme of the request, or null if none.
 o getCookies()
Gets the array of cookies found in this request.
 o getDateHeader(String, long)
Returns the value of a date header field.
 o getHeader(String)
Returns the value of a header field, or null if not known.
 o getHeaderNames()
Returns an Enumeration of the header names.
 o getIntHeader(String, int)
Returns the value of an integer header field.
 o getLongHeader(String, long)
Returns the value of a long header field.
 o getMethod()
Returns the method with which the request was made.
 o getPathInfo()
Returns optional extra path information following the servlet path, but immediately preceding the query string.
 o getPathTranslated()
Returns extra path information translated to a real path.
 o getQueryString()
Returns the query string part of the servlet URI, or null if none.
 o getRemoteUser()
Returns the name of the user making this request, or null if not known.
 o getRequestedSessionId()
Gets the session id specified with this request.
 o getRequestURI()
Returns the full request URI.
 o getServletPath()
Returns the part of the request URI that referred to the servlet being invoked.
 o getSession(boolean)
Gets the current valid session associated with this request, if create is false or, if necessary, creates a new session for the request, if create is true.
 o isRequestedSessionIdFromCookie()
Checks whether the session id specified by this request came in as a cookie.
 o isRequestedSessionIdFromUrl()
Checks whether the session id specified by this request came in as part of the URL.
 o isRequestedSessionIdValid()
Checks whether this request is associated with a session that is valid in the current session context.

Methods

 o getCookies
 public abstract Cookie[] getCookies()
Gets the array of cookies found in this request.

 o getMethod
 public abstract String getMethod()
Returns the method with which the request was made. This can be "GET", "HEAD", "POST", or an extension method. Same as the CGI variable REQUEST_METHOD.

 o getRequestURI
 public abstract String getRequestURI()
Returns the full request URI.

 o getServletPath
 public abstract String getServletPath()
Returns the part of the request URI that referred to the servlet being invoked. Analogous to the CGI variable SCRIPT_NAME.

 o getPathInfo
 public abstract String getPathInfo()
Returns optional extra path information following the servlet path, but immediately preceding the query string. Returns null if not specified. Same as the CGI variable PATH_INFO.

 o getPathTranslated
 public abstract String getPathTranslated()
Returns extra path information translated to a real path. Returns null if no extra path information was specified. Same as the CGI variable PATH_TRANSLATED.

 o getQueryString
 public abstract String getQueryString()
Returns the query string part of the servlet URI, or null if none. Same as the CGI variable QUERY_STRING.

 o getRemoteUser
 public abstract String getRemoteUser()
Returns the name of the user making this request, or null if not known. Same as the CGI variable REMOTE_USER.

 o getAuthType
 public abstract String getAuthType()
Returns the authentication scheme of the request, or null if none. Same as the CGI variable AUTH_TYPE.

 o getHeader
 public abstract String getHeader(String name)
Returns the value of a header field, or null if not known. Same as the information passed in the CGI variabled HTTP_*.

Parameters:
name - the header field name
 o getIntHeader
 public abstract int getIntHeader(String name,
                                  int def)
Returns the value of an integer header field.

Parameters:
name - the header field name
def - the integer value to return if header not found or invalid
 o getLongHeader
 public abstract long getLongHeader(String name,
                                    long def)
Returns the value of a long header field.

Parameters:
name - the header field name
def - the long value to return if header not found or invalid
 o getDateHeader
 public abstract long getDateHeader(String name,
                                    long def)
Returns the value of a date header field.

Parameters:
name - the header field name
def - the date value to return if header not found or invalid
 o getHeaderNames
 public abstract Enumeration getHeaderNames()
Returns an Enumeration of the header names.

 o getSession
 public abstract HttpSession getSession(boolean create)
Gets the current valid session associated with this request, if create is false or, if necessary, creates a new session for the request, if create is true.

Note: to ensure the session is properly maintained, the servlet developer must call this method (at least once) before any output is written to the response.

Additionally, application-writers need to be aware that newly created sessions (that is, sessions for which HttpSession.isNew returns true) do not have any application-specific state.

 o getRequestedSessionId
 public abstract String getRequestedSessionId()
Gets the session id specified with this request. This may differ from the actual session id. For example, if the request specified an id for an invalid session, then this will get a new session with a new id.

 o isRequestedSessionIdValid
 public abstract boolean isRequestedSessionIdValid()
Checks whether this request is associated with a session that is valid in the current session context. If it is not valid, the requested session will never be returned from the getSession method.

 o isRequestedSessionIdFromCookie
 public abstract boolean isRequestedSessionIdFromCookie()
Checks whether the session id specified by this request came in as a cookie. (The requested session may not be one returned by the getSession method.)

 o isRequestedSessionIdFromUrl
 public abstract boolean isRequestedSessionIdFromUrl()
Checks whether the session id specified by this request came in as part of the URL. (The requested session may not be the one returned by the getSession method.)


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs