This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

httpsession

 
Andrew Lit
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i thought that this servlet should show current time at first and later it should show last session's time and the current time, but all i get is current time. What is wrong with this code?
html:

servlet

thank you in advance
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what you are trying to do in this code. Why don't you try using getLastAccessedTime() or getCreationTime() to get the time stamps from HttpSession object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic