1 Reply Latest reply on Jan 23, 2006 1:40 PM by Jonathan Leech

    Caching Issue

    Justin Gargano Newbie

      In our test environment we frequently deploy wars as soon as a fix comes in. In this process we will login the application server, shutdown Jboss, remove the exploded war, explode the new one, and start JBoss back up.

      Our Issue (has only occured a few times, sparaticly):
      Once the server has started back up, some of the pages are of the last revision and not from the latest deployed war.

      (and we have refreshed the browser, cleared cache)

      JBoss 4.0.2
      Java 1.5.0_05
      Op: Solaris/SPARC

        • 1. Re: Caching Issue
          Jonathan Leech Newbie

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

          Your problem is likely that jasper compares the date the old .jsp was compiled and the date of the new .jsp, rather than the two .jsp dates. So there are all kinds of ways it gets out of whack, like rolling a file backward in version control, different timezones on development machines and production servers, etc. See the bug report for full explanation and hilarious Remy Maucherat commentary.

          In that bug report I have posted attachments containing the fix, as well as a drop-in replacement for jasper-compiler.jar which will fix your problem.

          You can also clear out the work/jboss.web directory which contains the compiled jsps, or touch all the .jsps before building new .wars. Either will force every .jsp to be recompiled when you redeploy.

          If it works for you, please vote for the bug, post comments etc. so that the Tomcat team will ignore Remy and incorporate the patch in a future release.