Introduction to Javaweb:01--web and HTTP protocols
the concept of the Web
- What is Web:
- The web is the most widely used distributed Application Architecture on the network.
- Designed to share all the interconnected information that is distributed across Web servers across the network.
- Three features:
- Use HTML to express information , and to create links between information and information.
- Using the unified resource location technology URL to realize the accurate location of information on the network .
- The Network Application layer protocol HTTP is used to standardize the communication between the browser and the Web server .
- Web Development process: a little.
Introduction to the HTTP protocol
- What is the HTTP protocol:
- HTTP (hypertext Transfer Protocol, Hypertext Transfer Protocol ).
- is a protocol on how to transfer HTML documents over a network .
- The HTTP protocol specifies the basic workings of the web, the details of the communication between the browser and the Web server .
- Layered Network Architecture diagram:
- The HTTP protocol is located on the application layer and is built on the TCP/IP protocol.
- The HTTP protocol uses a reliable TCP connection , which defaults to port 80.
- The HTTP protocol specifies the basic workings of the Web (based on client/server communication patterns)
- HTTP request Format:
- POST /servlet/helloservlet http/1.1 Request method URI HTTP protocol Host: 127.0.0.1:8080user-agent: mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) gecko/20100101 firefox/47.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q= 0.8Accept-language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3 Browser language accept-encoding: gzip , deflateReferer: http://127.0.0.1:8080/hello.htmlConnection : keep-alivecontent-type: application/x-www-form-urlencodedcontent-length: username=986836840&password=zy986836840 &submit=%b5%c7%c2%bd
- HTTP response Format:
- http/1.1 OKDescription of the status code for the HTTP protocol version status CodeServer:apache-coyote/1.1Server TypeContent-type:tExt/htmlbody Type (MIME)Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8accept-encoding:gzip, deflateaccept-language:zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3language used in the browserCache-control:Max-age=0Connection:Keep-aliveHost:127.0.0.1:8080user-agent:mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) gecko/20100101 firefox/47.0 Response Body
Javaweb:01--web and HTTP protocol introduction