java) http session object

HTTP Session Object

Data stored in server memory to maintain state between the client and server.

  • Stores data as key/value pairs using ConcurrentHashMap(attributes).
  • Creates a JSESSIONID cookie.
    • Key: JSESSIONID
    • Value: Session ID
  • request.getSession()
    • Checks the session ID in the JSESSIONID cookie and returns the corresponding session from the server.
    • getAttribute(key): Returns the attribute value stored in that session.

Post
Category
Series