Servlet API provides two important interfaces ServletResponse and HttpServletResponse to assist in sending response to client.
|PrintWriter ||returns a PrintWriter object that can send character text to the client.|
|void ||Sets the preferred buffer size for the body of the response|
|void ||Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header|
|void ||sets the content type of the response being sent to the client before sending the respond.|
|void ||sets the preferred buffer size for the body of the response.|
|boolean ||returns a boolean indicating if the response has been committed|
|void ||sets the locale of the response, if the response has not been committed yet.|
HttpServletResponse interface adds the methods that relates to the HTTP response.
|void ||adds the specified cookie to the response.|
|void ||Sends a temporary redirect response to the client using the specified redirect location URL and clears the buffer|
|int ||gets the current status code of this response|
|String ||gets the value of the response header with the given name.|
|void ||sets a response header with the given name and value|
|void ||sets the status code for this response|
|void ||sends an error response to the client using the specified status and clears the buffer|