javax.servlet.http
Interface HttpServletResponse

All Superinterfaces:
ServletResponse
All Known Implementing Classes:
HttpServletResponseWrapper, WinstoneResponse

public interface HttpServletResponse
extends ServletResponse

Interface definition for http response objects.

Author:
Rick Knowles

Field Summary
static int SC_ACCEPTED
           
static int SC_BAD_GATEWAY
           
static int SC_BAD_REQUEST
           
static int SC_CONFLICT
           
static int SC_CONTINUE
           
static int SC_CREATED
           
static int SC_EXPECTATION_FAILED
           
static int SC_FORBIDDEN
           
static int SC_FOUND
           
static int SC_GATEWAY_TIMEOUT
           
static int SC_GONE
           
static int SC_HTTP_VERSION_NOT_SUPPORTED
           
static int SC_INTERNAL_SERVER_ERROR
           
static int SC_LENGTH_REQUIRED
           
static int SC_METHOD_NOT_ALLOWED
           
static int SC_MOVED_PERMANENTLY
           
static int SC_MOVED_TEMPORARILY
           
static int SC_MULTIPLE_CHOICES
           
static int SC_NO_CONTENT
           
static int SC_NON_AUTHORITATIVE_INFORMATION
           
static int SC_NOT_ACCEPTABLE
           
static int SC_NOT_FOUND
           
static int SC_NOT_IMPLEMENTED
           
static int SC_NOT_MODIFIED
           
static int SC_OK
           
static int SC_PARTIAL_CONTENT
           
static int SC_PAYMENT_REQUIRED
           
static int SC_PRECONDITION_FAILED
           
static int SC_PROXY_AUTHENTICATION_REQUIRED
           
static int SC_REQUEST_ENTITY_TOO_LARGE
           
static int SC_REQUEST_TIMEOUT
           
static int SC_REQUEST_URI_TOO_LONG
           
static int SC_REQUESTED_RANGE_NOT_SATISFIABLE
           
static int SC_RESET_CONTENT
           
static int SC_SEE_OTHER
           
static int SC_SERVICE_UNAVAILABLE
           
static int SC_SWITCHING_PROTOCOLS
           
static int SC_TEMPORARY_REDIRECT
           
static int SC_UNAUTHORIZED
           
static int SC_UNSUPPORTED_MEDIA_TYPE
           
static int SC_USE_PROXY
           
 
Method Summary
 void addCookie(Cookie cookie)
           
 void addDateHeader(java.lang.String name, long date)
           
 void addHeader(java.lang.String name, java.lang.String value)
           
 void addIntHeader(java.lang.String name, int value)
           
 boolean containsHeader(java.lang.String name)
           
 java.lang.String encodeRedirectUrl(java.lang.String url)
          Deprecated. As of version 2.1, use encodeRedirectURL(String url) instead
 java.lang.String encodeRedirectURL(java.lang.String url)
           
 java.lang.String encodeUrl(java.lang.String url)
          Deprecated. As of version 2.1, use encodeURL(String url) instead
 java.lang.String encodeURL(java.lang.String url)
           
 void sendError(int sc)
           
 void sendError(int sc, java.lang.String msg)
           
 void sendRedirect(java.lang.String location)
           
 void setDateHeader(java.lang.String name, long date)
           
 void setHeader(java.lang.String name, java.lang.String value)
           
 void setIntHeader(java.lang.String name, int value)
           
 void setStatus(int sc)
           
 void setStatus(int sc, java.lang.String sm)
          Deprecated. As of version 2.1, due to ambiguous meaning of the message parameter. To set a status code use setStatus(int), to send an error with a description use sendError(int, String). Sets the status code and message for this response.
 
Methods inherited from interface javax.servlet.ServletResponse
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentType, setLocale
 

Field Detail

SC_ACCEPTED

static final int SC_ACCEPTED
See Also:
Constant Field Values

SC_BAD_GATEWAY

static final int SC_BAD_GATEWAY
See Also:
Constant Field Values

SC_BAD_REQUEST

static final int SC_BAD_REQUEST
See Also:
Constant Field Values

SC_CONFLICT

static final int SC_CONFLICT
See Also:
Constant Field Values

SC_CONTINUE

static final int SC_CONTINUE
See Also:
Constant Field Values

SC_CREATED

static final int SC_CREATED
See Also:
Constant Field Values

SC_EXPECTATION_FAILED

static final int SC_EXPECTATION_FAILED
See Also:
Constant Field Values

SC_FORBIDDEN

static final int SC_FORBIDDEN
See Also:
Constant Field Values

SC_FOUND

static final int SC_FOUND
See Also:
Constant Field Values

SC_GATEWAY_TIMEOUT

static final int SC_GATEWAY_TIMEOUT
See Also:
Constant Field Values

SC_GONE

static final int SC_GONE
See Also:
Constant Field Values

SC_HTTP_VERSION_NOT_SUPPORTED

static final int SC_HTTP_VERSION_NOT_SUPPORTED
See Also:
Constant Field Values

SC_INTERNAL_SERVER_ERROR

static final int SC_INTERNAL_SERVER_ERROR
See Also:
Constant Field Values

SC_LENGTH_REQUIRED

static final int SC_LENGTH_REQUIRED
See Also:
Constant Field Values

SC_METHOD_NOT_ALLOWED

static final int SC_METHOD_NOT_ALLOWED
See Also:
Constant Field Values

SC_MOVED_PERMANENTLY

static final int SC_MOVED_PERMANENTLY
See Also:
Constant Field Values

SC_MOVED_TEMPORARILY

static final int SC_MOVED_TEMPORARILY
See Also:
Constant Field Values

SC_MULTIPLE_CHOICES

static final int SC_MULTIPLE_CHOICES
See Also:
Constant Field Values

SC_NO_CONTENT

static final int SC_NO_CONTENT
See Also:
Constant Field Values

SC_NON_AUTHORITATIVE_INFORMATION

static final int SC_NON_AUTHORITATIVE_INFORMATION
See Also:
Constant Field Values

SC_NOT_ACCEPTABLE

static final int SC_NOT_ACCEPTABLE
See Also:
Constant Field Values

SC_NOT_FOUND

static final int SC_NOT_FOUND
See Also:
Constant Field Values

SC_NOT_IMPLEMENTED

static final int SC_NOT_IMPLEMENTED
See Also:
Constant Field Values

SC_NOT_MODIFIED

static final int SC_NOT_MODIFIED
See Also:
Constant Field Values

SC_OK

static final int SC_OK
See Also:
Constant Field Values

SC_PARTIAL_CONTENT

static final int SC_PARTIAL_CONTENT
See Also:
Constant Field Values

SC_PAYMENT_REQUIRED

static final int SC_PAYMENT_REQUIRED
See Also:
Constant Field Values

SC_PRECONDITION_FAILED

static final int SC_PRECONDITION_FAILED
See Also:
Constant Field Values

SC_PROXY_AUTHENTICATION_REQUIRED

static final int SC_PROXY_AUTHENTICATION_REQUIRED
See Also:
Constant Field Values

SC_REQUEST_ENTITY_TOO_LARGE

static final int SC_REQUEST_ENTITY_TOO_LARGE
See Also:
Constant Field Values

SC_REQUEST_TIMEOUT

static final int SC_REQUEST_TIMEOUT
See Also:
Constant Field Values

SC_REQUEST_URI_TOO_LONG

static final int SC_REQUEST_URI_TOO_LONG
See Also:
Constant Field Values

SC_REQUESTED_RANGE_NOT_SATISFIABLE

static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE
See Also:
Constant Field Values

SC_RESET_CONTENT

static final int SC_RESET_CONTENT
See Also:
Constant Field Values

SC_SEE_OTHER

static final int SC_SEE_OTHER
See Also:
Constant Field Values

SC_SERVICE_UNAVAILABLE

static final int SC_SERVICE_UNAVAILABLE
See Also:
Constant Field Values

SC_SWITCHING_PROTOCOLS

static final int SC_SWITCHING_PROTOCOLS
See Also:
Constant Field Values

SC_TEMPORARY_REDIRECT

static final int SC_TEMPORARY_REDIRECT
See Also:
Constant Field Values

SC_UNAUTHORIZED

static final int SC_UNAUTHORIZED
See Also:
Constant Field Values

SC_UNSUPPORTED_MEDIA_TYPE

static final int SC_UNSUPPORTED_MEDIA_TYPE
See Also:
Constant Field Values

SC_USE_PROXY

static final int SC_USE_PROXY
See Also:
Constant Field Values
Method Detail

addCookie

void addCookie(Cookie cookie)

addDateHeader

void addDateHeader(java.lang.String name,
                   long date)

addHeader

void addHeader(java.lang.String name,
               java.lang.String value)

addIntHeader

void addIntHeader(java.lang.String name,
                  int value)

containsHeader

boolean containsHeader(java.lang.String name)

encodeRedirectURL

java.lang.String encodeRedirectURL(java.lang.String url)

encodeURL

java.lang.String encodeURL(java.lang.String url)

sendError

void sendError(int sc)
               throws java.io.IOException
Throws:
java.io.IOException

sendError

void sendError(int sc,
               java.lang.String msg)
               throws java.io.IOException
Throws:
java.io.IOException

sendRedirect

void sendRedirect(java.lang.String location)
                  throws java.io.IOException
Throws:
java.io.IOException

setDateHeader

void setDateHeader(java.lang.String name,
                   long date)

setHeader

void setHeader(java.lang.String name,
               java.lang.String value)

setIntHeader

void setIntHeader(java.lang.String name,
                  int value)

setStatus

void setStatus(int sc)

setStatus

void setStatus(int sc,
               java.lang.String sm)
Deprecated. As of version 2.1, due to ambiguous meaning of the message parameter. To set a status code use setStatus(int), to send an error with a description use sendError(int, String). Sets the status code and message for this response.


encodeRedirectUrl

java.lang.String encodeRedirectUrl(java.lang.String url)
Deprecated. As of version 2.1, use encodeRedirectURL(String url) instead


encodeUrl

java.lang.String encodeUrl(java.lang.String url)
Deprecated. As of version 2.1, use encodeURL(String url) instead



Copyright © 2013. All Rights Reserved.