File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes how to refresh the date , without having to restart tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "how to refresh the date , without having to restart tomcat" Watch "how to refresh the date , without having to restart tomcat" New topic
Author

how to refresh the date , without having to restart tomcat

Amit Phagwani
Greenhorn

Joined: Jan 10, 2003
Posts: 6
hi i am working on a java application , on logging in to the application it mentions of the date on the login screen.
So if we do not shutdown tomcat one day , the next day it still shows the same old date.
we need to restart tomcat for it to pick the current date.
How do i fix this issue so that it refreshes the date automatically without having to restart
thanx
-a
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1177

From where are you showing the date - JSP, Servlet etc.
Rene


Regards, Rene Larsen
Dropbox Invite
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

How about on the page that shows the date, make sure you set the page to not cache on a client's machine?

There's plenty of post in this forum, and the Servlets forum about ensuring pages are not cached.

The other thing to consider is making sure you are placing this time into the correct servlet scope. I'd use request.
 
 
subject: how to refresh the date , without having to restart tomcat
 
Threads others viewed
How Replace Servlet When Tomcat is running ????
logic to display quotes,changing with systemdate
Weblogic to Sybase App Server communication
Weblogic to Sybase App Server communication
How Replace Servlet When Tomcat is running ????
IntelliJ Java IDE