0 Replies Latest reply: Aug 11, 2013 2:23 AM by 800839 RSS

    HttpSession will be closed automatically after the completion of httpRequest

    800839

      Hi,

       

      I am getting HttpSession from httpServletRequest of the doFilter() like :-

       

      HttpSession session = httpServletRequest.getSession();
      User user = new User();
      user.setName("Bob")
      session.setAttribute("USER", user);
      ...

      ...

      1) Here once the request is completed whether we need to explictly remove the attribute from the session and it is internally taken care when the request is complted by closing the session?
      2) Similarly whether this will create a problem in cluster env, in handling session replication across various boxes as the session instance needs to be replicated across boxes?

       

      Please clarify.

       

      Thanks.