https://issues.apache.org/bugzilla/show_bug.cgi?id=50455
--- Comment #1 from Alejandro Anadon <a...@enforex.es> 2010-12-10 13:22:51 EST --- (In reply to comment #0) > If we have a jsp file (not in a war file; just directly in the file system) > then we first call the jsp; then it is compiled and executed. > But if after this, the jsp file is modified very very fast (by an external > process for example), then, jasper does not detect the change and then do not > recompile the file, and so on, we do not see the change with the first > version. > > this is because in the class: > > org/apache/jasper/compiler/Compiler.java > > in the line 442 is like: > > 'if (targetLastModified < jspRealLastModified)' > > Why is the error? because in some systems, the method lastModified or > getLastModified does not care miliseconds and return units in seconds. > > Then, if we first compile, and after (in the same second) we modify the jsp > file, as the functions ignores miliseconds units, then jspRealLastModified is > equals to > targetLastModified (BUT IT IS NOT). > > So I think is that the solution is very simple. Change the condition from: > > 'if (targetLastModified < jspRealLastModified)' > > to > > 'if (targetLastModified <= jspRealLastModified)' > > > I tried this and it works. Just only to clarify that when I say 'the method lastModified or getLastModified does not care miliseconds and return units in seconds' I do not mean that the funtion returns seconds.. I mean that if the real time is '1292005037195' it returns '1292005037000' ignoring the 195ms. (The timestamp of creation of the file, In some file systems does this.) I tried to be as much clear as it is posible. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org