• Post Reply Bookmark Topic Watch Topic
  • New Topic

How does JSP page tell its own last access time?

 
Stephen Wei
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all:
Can a JSP page tell when it was last accessed?(By any request). How to do it?
Thanks!
------------------
Sun Certified Programmer for Java Platform
 
Tim Holloway
Bartender
Posts: 18417
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, assuming that the JSP wanted to display the time it was LAST accessed, that time would always be "right now"! If you wanted the PREVIOUS access time, you'd need to write it out somewhere and read it back.
In either case, the java.util.Date class can construct a current time object for you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!