Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Effect of time change on web application

 
Ghufran Ul Haq
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have changed datetime of my RHEL server. I have also restarted my tomcat after time changing. But the new time is not being reflected in the web application's log4j log file. It seems that tomcat is not picking up the current time of the computer.

Please help

Thanks
Ghufran
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container uses the last-modified-date to determine which JSPs need to be recompiled. A date change on the machine can muck this up.

On a Unix/Linux box, you can run the touch command with the wild card in each directory that contains JSPs to update the date for all the JSP files.



Another approach is to delete the tomcat/work directory (or the sub directory for your application).
The work directory is where Tomcat writes the generated servlet code and the compiled classes. If your app doesn't store anything else important in that directory (and only you would know this) then you can simply delete its contents.

Either approach will cause Tomcat to treat each JSP as new and recompile it when it's first hit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic