Java-jsp the response object of the built-in object

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.