Servlet -- HTTP, servlethttp

Source: Internet
Author: User

Servlet -- HTTP, servlethttp
I. HTTP protocol

· HTTP-Hypertext Transfer Protocol

· HTTP messages include the request message sent from the client to the server and the corresponding message sent from the server to the client.

· Information Exchange Process between browsers and servers

· Establish a connection

· Send request information

· Return response information

· Close connection

· HTTP is a stateless protocol.

· HTTP1. 1 supports persistent connections. A single connection can send multiple requests.

· The so-called stateless State means that the request response has no relationship with the next request response

 

 

· Basic HTTP request format

1) Request Line

2) Request Header

3) Request Entity (there will be request entities when the post method is submitted, and the get method is submitted without the Request Entity)

4) The get method transmits parameters through the request line. The amount of information that can be transferred is small and insecure.

5) The post object transfers parameters with a large amount of information, which is safe.

 

 

· Basic HTTP Response format

1) Status line

2) one or more Response Headers

3) a blank line

4) response entity

5) Connection: Specifies whether to maintain the Connection after processing the response of this request.

6) Date: the time when the current message was generated.

7) Pragma and Cache-Control: whether to Cache

8) Content-Length: Length of the Request/response body









 

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.