Httpservletresponse adds a method to indicate the status code, status information, and response header. It is also responsible for decoding the http session ID written to a web page in the URL.
Methods In the httpservletresponse Interface
Void addcookie adds a set-Cookie header to the response.
Void adddateheader (string name, long date) uses the specified date value to add a method with the specified name (or replace all the Response Header labels.
Void setheader (string name, string value) sets a response header with the specified name and value.
Void addintheader (string name, int value) uses the specified integer value to add the response header with the specified name (or replace all header labels with this name ).
Boolean containsheader (string name) returns true if the response contains the header mark of this name.
String encoderedirecturl (string URL) if the client does not know to accept cookid, the session ID is added to the URL. The first method only calls the URLs used in sendredirect. Other encoded URLs should be passed to encodeurl ()
String encodeurl (string URL)
Void senderror (INT status) sets the response status code to a specified value (optional status information ). Httpservleetresponse defines a complete set of Integer constants to indicate valid State values.
Void senderror (INT status, string MSG)
Void setstatus (INT status) specifies the response status code. Only applicable to the response that does not generate an error, while the error response uses senderror ().
# Java Column