What Is a Session ID?
In computer terms, a session refers to the process by which an end user communicates with an interactive system, such as from entering an account password to entering the operating system to exiting the operating system is a conversational process. Sessions are mostly used on the network. TCP's three-way handshake creates a session. When TCP closes a connection, it closes the session.
HTTP session
discuss
- Chinese name
- HTTP session
- Foreign name
- HTTP session
- In computer terms, a session refers to the process by which an end user communicates with an interactive system, such as from entering an account password to entering the operating system to exiting the operating system is a conversational process. Sessions are mostly used on the network. TCP's three-way handshake creates a session. When TCP closes a connection, it closes the session.
- Session represents a session between the server and the browser. This process is continuous or intermittent. In the servlet, when the JSP page does not explicitly prohibit the session, when the browser first requests the jsp for the first time, the server will automatically create a session for it, assign it a sessionID, and send it to the client's browser. When the client subsequently requests other resources in this application, it will automatically add to the request header: (Cookie: SESSIONID = the session ID that the client first obtained). In this way, when the server receives the request, it will receive the session ID, and based on the ID, it will find the previously created session object in memory and provide it to the request.
- (In servlet)
- This situation of maintaining the association between a user and multiple requests made by the same user between multiple HTTP connections is called maintaining a session.
- A session can associate a user with different requests made by the same user. The sessions of different users should be independent of each other.
- Once a session is established, it should exist until the user's idle time exceeds a certain time limit, and the container should release the session resources.
- During the lifetime of the session, the user may send many requests to the server, and the request information of the user can be stored in the session.
- Four processes
- 1, establish a TCP connection
- 2, issue a request document
- 3, issue a response document
- 4, release TCP connection