Related information:
"21-Day Learning Java Web Development"
Response Object
The 1.response object is used to transmit output information to the client.
method Return Value method Description
Addcookie (Cookie cookie) void Add cookie
Adddateheader (String name,long date) void adds a header with the name header, whose value is a date type
AddHeader (string name,string value) void adds a header with the name header, whose value is a string type
Addintheader (String name,int value) void adds a header with the name header whose value is an integer type
Setdateheader (String name,long date) void sets a header with a name header whose value is a date type
SetHeader (String name,string value) void sets a header name to a name header whose value is a word string type
Setintheader (String name,int value) void sets a header with the name header, whose value is an integer type
senderror (int sc) void transfer status Code
senderror (int sc,string msg) void transmits status codes and error messages
setStatus (int sc) void set status code
Sendredirect (String URL) void page redirection, used to implement page jumps
Java-jsp the response object of the built-in object