Play-framework gets the date of the last file modification

PlayFramework application, 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 the correct path , so footer.html exists.

But lm is 0, i.e. it's the 1970s .. but now is 2011.

Question: why? Could this be related to a security manager or something related to security?

+5
source share
1 answer

Can you check ${file.exists()}?

, , "footer.html" , ( temp/bytecode/DEV),

, , .

+2

All Articles