Name

HttpServletResponse

Synopsis

Interface Name: javax.servlet.http.HttpServletResponse

Superinterface: javax.servlet.ServletResponse

Immediate Subinterfaces: None

Implemented By: None

Availability: Servlet API 1.0 and later

Description

HttpServletResponse extends the ServletResponse class to allow manipulation of HTTP protocol-specific data, including response headers and status codes. It also defines a series of constants that represent various HTTP status codes and includes helper functions for session-tracking operations.

Interface Declaration

public interface HttpServletResponse extends javax.servlet.ServletResponse { // Constants public static final int SC_ACCEPTED; public static final int SC_BAD_GATEWAY; public static final int SC_BAD_REQUEST; public static final int SC_CONFLICT; public static final int SC_CONTINUE; // New in 2.0 public static final int SC_CREATED; public static final int SC_EXPECTATION_FAILED; // New in 2.2 public static final int SC_FORBIDDEN; public static final int SC_GATEWAY_TIMEOUT; // New in 2.0 public static final int SC_GONE; // New in 2.0 public static final int SC_HTTP_VERSION_NOT_SUPPORTED; // New in 2.0 public static final int SC_INTERNAL_SERVER_ERROR; public static final int SC_LENGTH_REQUIRED; // New in 2.0 public static final int SC_METHOD_NOT_ALLOWED; // New in 2.0 public static final int SC_MOVED_PERMANENTLY; public static final int SC_MOVED_TEMPORARILY; public static final int SC_MULTIPLE_CHOICES; // New in 2.0 public static final int SC_NO_CONTENT; ...

Get Java Servlet Programming, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.