Hi ,
I am a beginner in
servlets . I am studying it from Core Servlets and
JSP . I am using eclipse with
tomcat plugin(sysdeo) and the browser built in eclipse for practice purpose .
I tried the ShowItems + OrderForm example given in the chapter 9(Session Tracking) .
http://volume1.coreservlets.com/archive/Chapter9.html
In this a HttpSession object is created and arraylist object is added to it. This arraylist stores the items ordered . Each time the user orders an item it is stored in the object . No method except for getAttribute and setAttribute is called on the session object
The example works fine .
But once I stop the server and restart it(from within eclipse) and run the example(without closing eclipse) , the session persists. However if i stop the server and then restart eclipse and then run the example , the session is deleted and a new session is created .
Why is it so ? Shouldn't the session be destroyed on restarting the server . And if no , the why does it gets destroyed on restarting eclipse ?
Thanks and Regards
Akash