• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

java War file export

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my java project I have inside the WEB-INF folder a text file which contains a date that I generate with a shell file.

In my project I use the last modified time of this file.

The problem is when I export the project and I open the archive file (Web application ARchive), the last modified time of this text file is changed with three hours in addition.

I checked ecplise options, and I don't see how can this happend.

Any help will be much appreciated.
 
Saloon Keeper
Posts: 15727
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could have all sorts of wonky reasons.

This is exactly the reason why you should probably not depend on modification times. Why do you need this?
 
Alex Giovi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i use this to print the time of the deploy of my application in the main page when i run it on another computer.
 
Stephan van Hulst
Saloon Keeper
Posts: 15727
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you deploy your WAR to another server? It's probably better to update some sort of configuration file or resource bundle during the deployment procedure, because this is a much more reliable method.
 
Alex Giovi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First , i execute a bat file which append a date in txt file which is located under WEB-INF folder (the file is been modified with the date and modification time i want).
then i export my project as a War file , and i put it in a Ear file to be deployed after on a server.
The problem is in the war file before even the deploy of the application, after the creation of the war file, when i open it and check the txt file modification time , it's changed , so may be something is happend during the process of exportation, but i don't figure out what it is?
may be you're right , but all what i needed is the time of the creation of the war file (to be displayed after in my jsp file), this idea is simple and that's why i used it.
Thanks.
 
Stephan van Hulst
Saloon Keeper
Posts: 15727
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't actually say how you deploy the application. If this procedure it automated, you can let it generate a deployment time, and use that.
 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic