Servlet Sessions for a Shopping Cart
Posted on 2004-08-04
I am setting up a shopping cart and want to set up sessions for it. (for obvious reasons).
I have a simple session mechanism working using code like:
HttpSession session = request.getSession(true);
basket = (Basket)session.getAttribute("session.basket");
But it seems that when a user closes the browser window the session still exits BUT if the user goes to the URL it starts a new session EVEN though the users old session still exists.
So basically my problem is that when the user closes his browser window and goes back to the site later he is not in his old session.