This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi group, i've one login.jsp file where i'm creating a new session and setting the inactive time to 10 seconds. the code for this is
after that i forward the page to test1.jsp
my problem is that when i reach this test1.jsp page and leave it inactive for 10 seconds and then refresh, it prints "making new session". could any body tell me why it happens??? i also have test2.jsp. and i reach on this file by clicking on the anchor provided in test1.jsp.
which shows the perfect results. why it happens at one file while another file shows the perfect results. --regds-- --prateek--
I'm not sure that I understand what your problem is, but in the first case, the session is new because it was just created. The isNew method returns true which the ! reverses so you see the else output "making new session". The session won't be considered "old" unless it has been recovered by the servlet engine using a cookie from the browser. Bill