DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17934>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17934

Dates too late in jar entries





------- Additional Comments From [EMAIL PROTECTED]  2003-03-13 19:45 -------
Would it not be better to round down on the file lastModified() dates when doing
the comparison for the update?  It would leave you in a position so that if
someone did an update & save within 2 seconds after they did the initial
jarring, jar could fail to recognize that the file was updated, but that seems
preferable to the current behavior.

I suspect that jspc is a very common thing to do for ant users, and with the
current behavior jsp precompiling will always fail to be useful at least for
weblogic and I suspect for most other jsp engines.  The only workaround I know
of is to jar the jsp files into your jar, then wait 2 seconds, touch the jsp
files, jspc, then update the jar with the compiled jsps.

To be very clear about what's happening:

My jsps get copied to a working directory; they get a timestamp of e.g. 2137 
millis.

I do a jspc.  The jspc process checks the modification date on the jsp files and
embeds it in the compiled jsp so it can check the jsp for staleness.  It uses
the 2137 as the embedded date.

Then I jar all these up into a war file.  The jsp timestamp gets bumped to 4000
in the jar file.

When I run, the compiled jsp checks to see if it's stale after it's loaded.  The
modification date it sees on the jsp is 4000, which is after the 2137 which is
hard-coded into the compiled jsp, which causes the jsp to be recompiled.

Sleeping won't help unless I do a two step jarring process, or I have two copies
of the jsps - the ones I compile from and an older version that I actually put
in the war file.  In either case it's pretty kludgy, and, again, it strikes me
as likely to be a problem for lots of people.

Reply via email to