out.println("<HTML>"); out.println("<HEAD><TITLE>Session Lifecycle</TITLE></HEAD>"); out.println("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no cache\">"); out.println("<BODY>"); out.println("<H! Session LifeCycle</CENTER></H1>"); out.print("<BR> Session Status - "); if (session.isNew()) { out.println("New Session."); } else { out.println("Old Session."); } out.print("<BR> Session Id - "); out.println(session.getId()); out.print("<BR> Creation Time - "); out.println(new Date(session.getCreationTime())); out.print("<BR> Last Accessed Time - "); out.println(new Date(session.getLastAccessedTime())); out.print("<BR> Maximun Inactive Interval (seconds) - "); out.println(session.getMaxInactiveInterval());
String lifeCycleURL = "/session/servlet/lifeCycle"; out.print("<BR><BR><BR><BR><A HREF=\""+lifeCycleURL+"?action=invalidate\">"); out.println("Invalidate the session</A>"); out.print("<BR><A HREF=\""+lifeCycleURL+"\">"); out.println("Reload this page</A>"); out.println("</BODY></HTML>"); out.close(); } } } Although I have disabled cookies in my browser still on clicking on the "Reload link it gives me "Old Session". Can any1 help me out telling me how to disable cookies in a Windows Xp OS with I.E 6.0. Thanks
P. Udaya Shankar
Greenhorn
Joined: Nov 18, 2003
Posts: 21
posted
0
hi, try ur code using NS browser. i think u have disabled cookies in browser it seems, disable the cookie in ur page, using javascript then try it.
"Cool Bamby"- Welcome to the JavaRanch! Please adjust your displayed name to meet the JavaRanch Naming Policy. You can change it here. Thanks! and welcome to the JavaRanch! Mark