• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

session invalidate?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happens to a session if the containter is shutdown and then brought up again?
Thanks.
-yu chen
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you kept the session id (through cookies) you can maintain the session. Try this experiment with Tomcat4:
// a.jsp
<%
session.setAttribute("test", "HI");
%>
<%= session.getId() %>
//b.jsp
<%= (String) session.getAttribute("test") %>
Put them in your webapp and access a.jsp. Note and copy the sessionid displayed. Kill the browser and restart Tomcat4.
Access b.jsp and attach jsessionid={whatever sessionid you got} to the URL, e.g
http://localhost:8080/myContext/b.jsp;jsessionid=0B1816DE194C7A3E78F962B16052F79E
 
reply
    Bookmark Topic Watch Topic
  • New Topic