org.mortbay.jetty.servlet
public class ServletHttpResponse extends Object implements HttpServletResponse
Version: $Id: ServletHttpResponse.java,v 1.65 2006/04/04 22:28:05 gregwilkins Exp $
Field Summary | |
---|---|
static int | DISABLED |
static int | NO_OUT |
static int | OUTPUTSTREAM_OUT |
static int | WRITER_OUT |
Constructor Summary | |
---|---|
ServletHttpResponse(ServletHttpRequest request, HttpResponse response) |
Method Summary | |
---|---|
void | addCookie(Cookie cookie) |
void | addDateHeader(String name, long value) |
void | addHeader(String name, String value) |
void | addIntHeader(String name, int value) |
boolean | containsHeader(String name) |
String | encodeRedirectUrl(String url) |
String | encodeRedirectURL(String url) |
String | encodeUrl(String url) |
String | encodeURL(String url) |
void | flushBuffer() |
int | getBufferSize() |
String | getCharacterEncoding() |
String | getContentType() |
Locale | getLocale() |
ServletOutputStream | getOutputStream() |
PrintWriter | getWriter() |
boolean | isCommitted() |
void | reset() |
void | resetBuffer() |
void | sendError(int status, String message) |
void | sendError(int status) |
void | sendRedirect(String url) |
void | setBufferSize(int size) |
void | setCharacterEncoding(String encoding) |
void | setContentLength(int len) |
void | setContentType(String contentType) |
void | setDateHeader(String name, long value) |
void | setHeader(String name, String value) |
void | setIntHeader(String name, int value) |
void | setLocale(Locale locale)
Sets the locale of the response, setting the headers (including the
Content-Type's charset) as appropriate. |
void | setStatus(int status) |
void | setStatus(int status, String message) |
String | toString() |
static ServletHttpResponse | unwrap(ServletResponse response) Unwrap a ServletResponse.
|
Deprecated: As of version 2.1, use encodeRedirectURL(String url) instead
Deprecated: As of version 2.1, use encodeURL(String url) instead
Parameters: locale the Locale of the response
See Also: ServletHttpResponse
Deprecated: As of version 2.1 of the Servlet spec.
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.
Parameters: status the status code message the status message
Parameters: response
Returns: The core ServletHttpResponse which must be the underlying response object