The servlet engine buffers output before sending it to the client.
Buffering adds efficiency and flexibility. Until data is actually
committed to the client, the servlet can change headers or reset the
entire results.
Character encoding
Use either setContentType or setLocale to
set the character encoding.
Resets the output stream, clearing headers and the output buffer.
Calling reset() after data has been committed is illegal.
throws: IllegalStateException - if isCommitted() is true.
Resets the output stream, clearing headers and the output buffer.
Calling reset() after data has been committed is illegal.
throws: IllegalStateException - if isCommitted() is true.
Sets the response content type. The content type includes
the character encoding. The content type must be set before
calling getWriter() so the writer can use the
proper character encoding.
To set the output character encoding to ISO-8859-2, use the
following:
Sets the output locale. The response will set the character encoding
based on the locale. For example, setting the "kr" locale will set
the character encoding to "EUC_KR".