luehe       2004/10/19 13:18:02

  Modified:    jasper2/src/share/org/apache/jasper/compiler Compiler.java
  Log:
  Update the JspServletWrapper's lastModificationTest timestamp at the
  right place in the code (the place where we used to set it was never
  reached if the JSP kept changing before each isOutDated() check,
  defeating the purpose of the modificationTestInterval init param)
  
  Revision  Changes    Path
  1.98      +10 -7     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- Compiler.java     14 Oct 2004 23:54:00 -0000      1.97
  +++ Compiler.java     19 Oct 2004 20:18:02 -0000      1.98
  @@ -328,12 +328,16 @@
   
           String jsp = ctxt.getJspFile();
   
  -        if ((jsw != null)
  -            && (ctxt.getOptions().getModificationTestInterval() > 0)
  -            && ((jsw.getLastModificationTest()
  -                    + (ctxt.getOptions().getModificationTestInterval() * 1000)) 
  -                    > System.currentTimeMillis())) {
  -            return false;
  +        if (jsw != null
  +                && (ctxt.getOptions().getModificationTestInterval() > 0)) {
  + 
  +            if (jsw.getLastModificationTest()
  +                    + (ctxt.getOptions().getModificationTestInterval() * 1000) 
  +                    > System.currentTimeMillis()) {
  +                return false;
  +            } else {
  +                jsw.setLastModificationTest(System.currentTimeMillis());
  +            }
           }
           
           long jspRealLastModified = 0;
  @@ -381,7 +385,6 @@
           if( jsw==null ) {
               return false;
           }
  -        jsw.setLastModificationTest(System.currentTimeMillis());
           
           List depends = jsw.getDependants();
           if (depends == null) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to