O'Reilly logo

Java Servlet Programming by Jason Hunter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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_CREATED; public static final int SC_CONTINUE; // New in 2.0 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; public static final int SC_NON_AUTHORITATIVE_INFORMATION; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required