Java Web Learning Note one

Source: Internet
Author: User

First, the HTML protocol

HTML protocol: Hypertext Transfer Protocol (hypertext Transfer Protocol) is simply a set of rules for the transmission of computer communication information

The HTML protocol is a protocol that does not record the state of the Protocol when a request is made and the server connection is disconnected after the connection is not maintained

The four steps of HTML:

First, the client establishes a connection with the Web server: input and output via IO stream

The second is the client sends the HTTP request: The request content includes the request line, the blank line, the request header, the message body

The request line consists of three parts: The method that requests the HTTP, the request URI path, the version information of the HTTP

HTTP request methods include the following:

GET: Used to retrieve resources from the server

POST: Used to send database data to the server

Head: Same as Get method the server returns only the status line and header, and does not return the requested document

Delete: Request server to delete named resource in URI

Options: Request method information about the server support request

TRACE: Requests the Web server to feedback HTTP requests and headers

CONNECT: Reserved

The third is the server side receives the client's HTTP request, the file and other information constitutes the HTTP response back to the client: The HTTP response includes the status line, the blank line, the response header, and the message body

The status line consists of the version information, the response status code, and the response description.

Response Status Code: The response status code has five groups of numbers 1 begins with the information request received the number 2 is successful, the behavior is successfully received understanding and acceptance

The number 3 begins with redirection, the next request must be made for the completion of the request number 4 starts with a client error, the request cannot be implemented generally 404 occurrences the most number 5 starts with a server error

Four is the server-side shutdown connection

Can be understood as a client-side browser to establish a connection with the Web server and then clients send requests over HTTP to the server, and then generate an HTTP response back to the browser above the server shutdown

Ii. Basic Concepts

Web resources on the Internet for external access are divided into:

    1. Static Web resources (such as HTML pages): Data that is accessible to people in a Web page is always the same.
    2. Dynamic Web resources: refers to the Web page for people to browse the data is generated by the program, at different points of time to access the Web page to see the content varies.

Static Web Resource development technology: Html
Common Dynamic Web Resources development technology: Jsp/servlet, ASP, PHP, etc.
In Java, Dynamic Web resource development technologies are collectively referred to as Javaweb.

Web server flaw: The only way to provide static page content to the client is that the page the customer sees is the same solution: CGI (Common Gateway Interface) Universal Gateway Interface creates a dynamic server-side content servlet: He is a Web server-side or application server-side Java Program Web container: Supports Servlet, JSP run provides an environment Java Web application main: Configuration files, static files and JSPs, class files and packages

Java Web Learning Note one

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.