I have a jsp that keeps count and is storing the info in a HttpSession object using the setAttribute method(The code is at the bottom). How does the server know I am the same client is before? I am just using http which is stateless. I also don't see any cookies transferring the data back. If I close and reopen, my browser, the incrementing starts all over again. Thanks for helping me understand this better.
dean
<%@ page errorPage="errorpage.jsp" %><html> <head> <title>Session Example</title> </head> <body> <% // get a reference to the current count from the session Integer count = (Integer)session.getAttribute("COUNT"); if ( count == null ) { // If the count was not found create one count = new Integer(1); // and add it to the HttpSession session.setAttribute("COUNT", count); } else { // Otherwise increment the value count = new Integer(count.intValue() + 1); session.setAttribute("COUNT", count); } out.println("<b>You have accessed this page: " + count + " times.</b>"); %> </body></html>