Session objects are created in the client or the server


Web tier: servlets, JSP, Web frameworks: Session objects are created in the client or the server

  1. Hi all,

    Can anyone tell me where the HttpSession object is created? I ant to know if it ocupies the memory of the server or the client. Does the session gets serialized with the request and response?

  2. INteresting question. Assuming your context is a JSP / servlet environment, your session object will be found either in memeory, or persisted by your servlet container,.. on the server.

  3. HttpSession objects are always stored on the server.

    In 'Netscape terminology', an HttpSession object is a server-side cookie.

    -- Rick
  4. Thank you very much Sean and Rick.

  5. HI

    I'll add some more pts for the earlier replies.

    Once session object is created with the session id, it will be sent to the client. If the client browser accepts cookies this id will be stored as cookies else this session id will be appended with Url for each and every request. This id is used as referece for retrieving the actual session objects stored in the server. The size of session again depends on your webserver.