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.
The moose likes Servlets and the fly likes httpsession Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "httpsession" Watch "httpsession" New topic


Andrew Lit
Ranch Hand

Joined: Jul 01, 2002
Posts: 135
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?


thank you in advance
Vinod John
Ranch Hand

Joined: Jun 23, 2003
Posts: 162
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.
I agree. Here's the link:
subject: httpsession
It's not a secret anymore!