Name

HttpServletRequest

Synopsis

Interface Name: javax.servlet.http.HttpServletRequest

Superinterface: javax.servlet.ServletRequest

Immediate Subinterfaces: None

Implemented By: None

Availability: Servlet API 1.0 and later

Description

HttpServletRequest extends the basic ServletRequest class, providing additional functionality for HTTP (World Wide Web) servlets. It includes support for cookies and session tracking and access to HTTP header information. HttpServletRequest also parses incoming HTTP form data and stores it as servlet parameters.

The server passes an HttpServletRequest object to the service method of an HttpServlet.

Certain methods in this interface have suffered from documentation and implementation inconsistencies. Discrepancies have been noted where possible.

Interface Declaration

public interface HttpServletRequest extends javax.servlet.ServletRequest { // Methods public abstract String getAuthType(); public abstract Cookie[] getCookies(); // New in 2.0 public abstract long getDateHeader(String name); public abstract String getHeader(String name); public abstract Enumeration getHeaderNames(); public abstract int getIntHeader(String name); public abstract String getMethod(); public abstract String getPathInfo(); public abstract String getPathTranslated(); public abstract String getQueryString(); public abstract String getRemoteUser(); public abstract String getRequestedSessionId(); // New in 2.0 public abstract String getRequestURI(); public abstract String getServletPath(); ...

Get Java Servlet Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.