Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Last updated...  RSS feed

 
Tom Diamond
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello people,
Is there a smart way to include a "Last Updated" entry in a jsp? Something like finding when current file was last modified, perhaps?
Tom.
 
japper
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think jakarta has a tag library that will do this.
Check out http://jakarta.apache.org
 
Tom Diamond
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I searched all the tag libraries of jakarta project but I didn't find anything to fit...
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 2 "last updated" time values, since technically you could consider a page compilation as an update, and depending on the options of your server, this could be much more recent than the source mod.
Your best best is probably to either use a smart editor or (and/or) a version control system. Most vcs's have some sort of ability to macro-expand certain variables such as the checkin timestamp.
 
japper
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about that. I thought Jakarta had one.
I know of two:
One is at http://www.servletsuite.com/servlets/lastmod.htm
and the other is at http://www.dotjonline.com/taglib/lastmodified.jsp
Good luck.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works.. (But as Tim mentioned, it picks up the last compilation time, and not the source file timestamp -- but this will be the case for the taglibs as well).
------------------
Miftah Khan
- Sun Certified Programmer for the Java� 2 Platform
- Sun Certified Web Component Developer for the Java� 2 Platform, Enterprise Edition
 
Tom Diamond
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx people!
You 've been very helpfull!
Tom.
 
G Subrahmanyam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice Reply
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!