|Summary:||WarURLConnection always returns 0 from getLastModified() which prevents JSP modifications from triggering recompilation|
|Product:||Tomcat 8||Reporter:||Andy Wilkinson <awilkinson>|
|Component:||Catalina||Assignee:||Tomcat Developers Mailing List <dev>|
|OS:||Mac OS X 10.1|
Description Andy Wilkinson 2017-05-25 20:27:32 UTC
When JspCompilationContext is attempting to get the last modified time for a JSP it gets a URL for it and opens a connection. When this is a war: URL it gets a WarURLConnection and calls getLastModified(). This method always returns zero. As a result, a JSP is compiled the first time it is accessed but any subsequent changes are then ignored, even across a restart of Tomcat (assuming that the work directory is left intact).
Comment 1 Mark Thomas 2017-05-26 11:10:40 UTC
I can reproduce this and I'm working on a fix. Out of interest is this a regression or a bug you've just noticed?
Comment 2 Andy Wilkinson 2017-05-26 11:19:18 UTC
As far as I know, this isn't a regression.
Comment 3 Mark Thomas 2017-05-26 11:34:32 UTC
Thanks. And thanks for the report. Fixed in: - trunk for 9.0.0.M22 onwards - 8.5.x for 8.5.16 onwards - 8.0.x for 8.0.45 onwards