Discover the working method of session in web application
Answers
The user requests a webpage.
The browser sends the request to the web server.
The server sees that there is no "session related information/identifier" in the request. So it creates a new session (and a new session identifier — the JSESSIONID).
The server sends the JSESSIONID back to the client (e.g. in a cookie, along with the main HTML response).
At this point, both the server and the client have the same session identifier (JSESSIONID) with them.
From here on, when the browser sends additional requests to the server, it has to send the session identifier (JSESSIONID) as part of the request as well. (Note: Whenever a browser sends a request to a web server, all cookies set by the same server are automatically sent in the request. So, the JSESSIONID cookie also gets sent to the server automatically).
When the server gets a request, it checks if the browser sent a session identifier as part of the request. If yes, the server treats the request as part of the same session.
This handshake goes on until the session gets destroyed (or until it expires).
hope it helps u buddy
Please.Mark me as Brainliest
hope it's Helpful