What is Cookie ? What is its purpose ?
By default cookies stay alive only as long as a session exists; once the client quits his browser, the cookies disappears. That’s how the “JSESSIONID” cookie works.
But we can make a cookie to stay alive even AFTER the browser shuts down. In this way our web application can still get the cookie information even though the session with that client is long gone.
If we set cookies programatically we don’t have to bother whether the user restarted his browser and hasn’t been on the site for a week.
Cookie Purpose: Session Tracking
Http Cookie is the most used session tracking mechanism and is required to be supported by all servlet containers.
Specification dictates that the session tracking cookie must be “JSESSIONID” cookie.
0 Comments:
Post a Comment
<< Home