HttpServletResponse object.
This provides the bridge from the Servlet HttpServletResponse to the Jetty Core Response
via the ServletContextResponse.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ServletChannel | |
| private final ServletContextHandler. | |
| private final ServletContextHandler. | |
| private static final EnumSet | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCookie(Cookie
the Cookie to return to the client cookie)Implements jakarta. Adds the specified cookie to the response. |
| public void | |
| public void | addDateHeader(String
the name of the header to set name, long the additional date value date)Implements jakarta. Adds a response header with the given name and date-value. |
| public void | addHeader(String
the name of the header name, String the additional header value If it contains octet string, it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt) value)Implements jakarta. Adds a response header with the given name and value. |
| public void | addIntHeader(String
the name of the header name, int the assigned integer value value)Implements jakarta. Adds a response header with the given name and integer value. |
| public boolean | containsHeader(String
the header name name)Implements jakarta. Returns a boolean indicating whether the named response header has already been set. |
| public String | encodeRedirectURL(String
the url to be encoded. url)Implements jakarta. Encodes the specified URL for use in the |
| public String | encodeURL(String
the url to be encoded. url)Implements jakarta. Encodes the specified URL by including the session ID, or, if encoding is not needed, returns the URL unchanged. |
| public void | flushBuffer()
Implements jakarta. Forces any content in the buffer to be written to the client. |
| public int | getBufferSize()
Implements jakarta. Returns the actual buffer size used for the response. |
| public String | getCharacterEncoding()
Implements jakarta. Returns the name of the character encoding (MIME charset) used for the body sent in this response. |
| public long | |
| public String | getContentType()
Implements jakarta. Returns the content type used for the MIME body sent in this response. |
| public String | getHeader(String
the name of the response header whose value to return name)Implements jakarta. Gets the value of the response header with the given name. |
| public Collection | getHeaderNames()
Implements jakarta. Gets the names of the headers of this response. |
| public Collection | getHeaders(String
the name of the response header whose values to return name)Implements jakarta. Gets the values of the response header with the given name. |
| public Locale | getLocale()
Implements jakarta. Returns the locale specified for this response using the |
| public ServletOutputStream | getOutputStream()
Implements jakarta. Returns a |
| public Response | |
| public ServletChannel | |
| public ServletContextHandler. | |
| public ServletContextHandler. | getServletResponseInfo()
Returns: The |
| public int | getStatus()
Implements jakarta. Gets the current status code of this response. |
| public Supplier | getTrailerFields()
Overrides default jakarta. Gets the supplier of trailer headers. |
| public PrintWriter | getWriter()
Implements jakarta. Returns a |
| public boolean | isCommitted()
Implements jakarta. Returns a boolean indicating if the response has been committed. |
| public void | reset()
Implements jakarta. Clears any data that exists in the buffer as well as the status code, headers. |
| public void | resetBuffer()
Implements jakarta. Clears the content of the underlying buffer in the response without clearing headers or status code. |
| public void | sendError(int
the error status code sc, String the descriptive message msg)Implements jakarta. Sends an error response to the client using the specified status and clears the buffer. |
| public void | sendError(int
the error status code sc)Implements jakarta. Sends an error response to the client using the specified status code and clears the buffer. |
| public void | sendRedirect(String
the redirect location URL location)Implements jakarta. Sends a temporary redirect response to the client using the specified redirect location URL and clears the buffer. |
| public void | sendRedirect(int
the redirect status code code, String the location to send in location)Location headersSends a response with one of the 300 series redirection codes. |
| public void | setBufferSize(int
the preferred buffer size size)Implements jakarta. Sets the preferred buffer size for the body of the response. |
| public void | setCharacterEncoding(String
a String specifying only the character set defined by IANA Character Sets
(http://www.iana.org/assignments/character-sets) or encoding)nullImplements jakarta. Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
| public void | setContentLength(int
an integer specifying the length of the content being returned to the client; sets the Content-Length
header len)Implements jakarta. Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header. |
| public void | setContentLengthLong(long
a long specifying the length of the content being returned to the client; sets the Content-Length header len)Implements jakarta. Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header. |
| public void | setContentType(String
a contentType)String specifying the MIME type of the content or nullImplements jakarta. Sets the content type of the response being sent to the client, if the response has not been committed yet. |
| public void | setDateHeader(String
the name of the header to set name, long the assigned date value date)Implements jakarta. Sets a response header with the given name and date-value. |
| public void | setHeader(String
the name of the header name, String the header value If it contains octet string, it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt) value)Implements jakarta. Sets a response header with the given name and value. |
| public void | setIntHeader(String
the name of the header name, int the assigned integer value value)Implements jakarta. Sets a response header with the given name and integer value. |
| public void | setLocale(Locale
the locale of the response or {code @null} locale)Implements jakarta. Sets the locale of the response, if the response has not been committed yet. |
| public void | setStatus(int
the status code sc)Implements jakarta. Sets the status code for this response. |
| public void | setTrailerFields(Supplier<Map<String, String>>
the supplier of trailer headers trailers)Overrides default jakarta. Sets the supplier of trailer headers. |
| public String |