https://bz.apache.org/bugzilla/show_bug.cgi?id=63897

            Bug ID: 63897
           Summary: Jasper doesn't reload a JSP if it was modified while
                    being compiled
           Product: Tomcat 9
           Version: 9.0.27
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: k...@xk72.com
  Target Milestone: -----

Created attachment 36867
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36867&action=edit
Compiler patch

In our development workflow we often save a JSP and reload it in the browser,
again and again. If we happen to save a JSP while Jasper is compiling it,
Jasper will assign the timestamp of the modified JSP to the generated java and
class files even though they were in fact generated from the previous version
of the JSP, as Jasper reads the JSP's modification time _after_ compiling.
Jasper will then not detect that the change was made and will not recompile the
JSP again until the next time it is modified.

The fix is to simply move the line of code in
org.apache.jasper.compiler.Compiler in the compile(boolean, boolean) method
that reads the jspLastModified from after the compile to before it.

This change will mean no missed JSP updates.

A simple patch is attached.

-- 
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

Reply via email to