Basic knowledge of Spring MVC: HTTP

Source: Internet
Author: User

The story has to be told some night before 30 ... This is the classic line we often see on TV. To borrow, we have to start with the HTTP protocol for spring MVC.

HTTP protocol

The HTTP protocol is an application-level, request-response model, stateless protocol. Stateless means that each request is independent, in other words, the protocol itself cannot help us if we need to pass information to each other. This is why additional techniques are needed to hold the state of the request, such as a cookie that holds certain state information on the client or session on the server to save state information.

Uniform Resource Locator (URL)

A Uniform Resource Locator (URL) is the most common form of resource identifiers (URIs) that describe a specific location of a resource on a particular server. These resources can be accessed through a variety of different scenarios (such as HTTP, FTP, SMTP), and the URL syntax for most URL scenarios is based on the following common format:

<scheam>://<user>:<password>@

The original servlet or spring MVC @requestmappping annotations provide a variety of methods that allow us to get the various parts of the URL to handle specific requests. Familiarity with the components of URLs allows us to be more clear about what we do in our daily work.

URL encoding

The URL itself is represented by the Us-ascii character set, so that it is not possible to represent the various characters of other non-English-speaking countries in the world, so the designer integrates the transfer sequence, and the escape sequence allows you to encode any character value or data using a finite subset of the US-ASCII character set. In the URL, a few characters are reserved, these characters have a special meaning, if you do need to use these reserved characters in the URL, you need to escape it, the escaped rule is percent percent (%) followed by two hexadecimal numbers that represent the ASCII code of characters.

HTTP request message and HTTP response message http://www.cnblogs.com/biyeymyhjob/archive/2012/07/28/2612910.htmlSummary: Here is just a brief introduction to the most common basics of HTTP, even if these basic content is easy to understand, but really understanding them is important. Only by understanding these features of HTTP can we really understand the various solutions that the web framework takes, such as the parameters of the servlet processing request methods (request, response), which encapsulate the requests and response messages separately, and why the session is required.

Recommended bibliography: HTTP authoritative guide, an easy-to-read book, nearly 700 pages of tome, so that HTTP is simple and not simple.

Basic knowledge of Spring MVC: HTTP

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.