tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33453] New: - Jasper should recompile JSP files whose datestamps change in either direction (not just newer)
Date Tue, 08 Feb 2005 21:50:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33453>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33453

           Summary: Jasper should recompile JSP files whose datestamps
                    change in either direction (not just newer)
           Product: Tomcat 5
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jamie@white-mountain.org


I've noticed that Tomcat won't recompile a JSP file if the date stamp is changed
to go back in time. This may seem like a strange case, but if you check an older
copy of a JSP page out of version control, it's different, and needs to be
recompiled. The assumption that all changes to a file involve a newer file
datestamp is an invalid one.

I think I found the code that makes this decision, in
org.apache.jasper.compiler.Compiler, in the isOutDated(boolean) method. The
condition is
        if (targetLastModified < jspRealLastModified)
but it should be
        if (targetLastModified != jspRealLastModified)
in my opinion.

After all, the logic should be that the file has changed, not that it's newer. I
don't think it's reasonable to expect that Jasper check the size and do an MD5
checksum to *really* see if the file has changed. :)

Obviously the workaround is to just to "touch" the file but this adds a lot of
overhead (and one more thing to remember), compared to changing a > to a !=.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message