PlayFramework application, the footer.html file:
%{
file = new File("footer.html");
path = file.getCanonicalPath();
lm = file.lastModified();
// date = new Date(lm);
}%
<span> Last update: ${lm} </span>
Here I have right path, so the footer.html is exist.
But the lm is 0 i.e. it is 1970 year.. but now is 2011.
The question: why? Can it be related somehow to security-manager or something related to security?
Can you check ${file.exists()}
?
I think what's happening is that your file "footer.html" does not exists, because play will use compiled views (usually on temp/bytecode/DEV folder), and in the compiled views, this file does not exists
Even if you change to the compiled filename it would not work on the server, because modification date of the file on the build would be the date of the build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With