Defines an object to assist a servlet in sending a response to the client.
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getConceptsAtPath, getErrorHandler, getInheritedConcepts, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML |
|
Parameters: |
$cookie : | the Cookie to return to the client. |
|
Adds the specified cookie to the response. This method can be
called multiple times to set more than one cookie.
Parameters: |
$name : | the name of the header. |
$value : | the additional header value. |
|
Adds a response header with the given name and value. This
method allows response headers to have multiple values.
Returns a logical indicating whether the named response
header has already been set.
Parameters: |
$url : | the url to be encoded. |
|
Encodes the specified URL for use in the sendRedirect method
or, if encoding is not needed, returns the URL unchanged. The
implementation of this method includes the logic to determine
whether the session ID needs to be encoded in the URL. Because
the rules for making this determination can differ from those
used to decide whether to encode a normal link, this method is
seperate from the encodeURL method.
All URLs sent to the ServletResponse.sendRedirect method
should be run through this method. Otherwise, URL rewriting
cannot be used with browsers which do not support cookies.
Parameters: |
$url : | the url to be encoded. |
|
Encodes the specified URL by including the session ID in it,
or, if encoding is not needed, returns the URL unchanged. The
implementation of this method includes the logic to determine
whether the session ID needs to be encoded in the URL. For
example, if the browser supports cookies, or session tracking is
turned off, URL encoding is unnecessary.
For robust session tracking, all URLs emitted by a servlet
should be run through this method. Otherwise, URL rewriting
cannot be used with browsers which do not support cookies.
Forces any content in the buffer to be written to the client.
A call to this method automatically commits the response,
meaning the status code and headers will be written.
Returns the actual buffer size used for the response. If no
buffering is used, this method returns 0.
Returns the name of the charset used for the MIME body sent
in this response.
If no charset has been assigned, it is implicitly set to ISO-
8859-1 (Latin-1).
See RFC 2047 (http://ds.internic.net/rfc/rfc2045.txt
) for
more information about character encoding and MIME.
Returns a logical indicating if the response has been
committed. A commited response has already had its status code
and headers written.
Clears any data that exists in the buffer as well as the
status code and headers. If the response has been committed,
this method throws an IllegalStateException.
Parameters: |
$statusCode : | the error status code. |
|
Sends an error response to the client using the specified
status. The server generally creates the response to look like a
normal server error page.
If the response has already
been committed, this method throws an IllegalStateException.
After using this method, the response should be considered to be
committed and should not be written to.
Parameters: |
$statusCode : | the error status code. |
$message : | the descriptive message. |
|
Sends an error response to the client using the specified
status code and descriptive message. The server generally
creates the response to look like a normal server error
page.
If the response has already been committed, this method
throws an IllegalStateException. After using this method, the
response should be considered to be committed and should not be
written to.
Parameters: |
$location : | the redirect location URL. |
|
Sends a temporary redirect response to the client using the
specified redirect location URL. This method can accept relative
URLs; the servlet container will convert the relative URL to an
absolute URL before sending the response to the client.
If the response has already been committed, this method
throws an IllegalStateException. After using this method, the
response should be considered to be committed and should not be
written to.
Parameters: |
$bufferSize : | the preferred buffer size. |
|
Sets the preferred buffer size for the body of the response.
The servlet container will use a buffer at least as large as the
size requested. The actual buffer size used can be found using
getBufferSize.
A larger buffer allows more content to be written before
anything is actually sent, thus providing the servlet with more
time to set appropriate status codes and headers. A smaller
buffer decreases server memory load and allows the client to
start receiving data more quickly.
This method must be called before any response body content
is written; if content has been written, this method throws an
IllegalStateException.
Parameters: |
$length : | an integer specifying the length of the content
being returned to the client; sets the Content-Length
header |
|
Sets the length of the content body in the response In HTTP
servlets, this method sets the HTTP Content-Length header.
Parameters: |
$contentType : | a String specifying the MIME type of the content. |
|
Sets the content type of the response being sent to the
client. The content type may include the type of character
encoding used, for example, text/html; charset=ISO-8859-4.
Parameters: |
$name : | the name of the header. |
$value : | the header value. |
|
Sets a response header with the given name and value. If the
header had already been set, the new value overwrites the
previous one. The containsHeader method can be used to test for
the presence of a header before setting its value.
Parameters: |
$statusCode : | the status code. |
|
Sets the status code for this response. This method is used
to set the return status code when there is no error (for
example, for the status codes OK(200) or MOVED TEMPORARILY(302). If
there is an error, the sendError method should be used
instead.