From: markt Date: Fri, 27 Mar 2009 09:42:47 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=41606 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5395717d79089b26440de9f857d48df53b9418da;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=41606 Prevent double init() of JSP Patch provided by Chris Halstead git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@759074 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/Compiler.java b/java/org/apache/jasper/compiler/Compiler.java index 397f0c7bd..a6afd04b7 100644 --- a/java/org/apache/jasper/compiler/Compiler.java +++ b/java/org/apache/jasper/compiler/Compiler.java @@ -332,6 +332,15 @@ public abstract class Compiler { String[] smap = generateJava(); if (compileClass) { generateClass(smap); + // Fix for bugzilla 41606 + // Set JspServletWrapper.servletClassLastModifiedTime after successful compile + String targetFileName = ctxt.getClassFileName(); + if (targetFileName != null) { + File targetFile = new File(targetFileName); + if (targetFile.exists() && jsw != null) { + jsw.setServletClassLastModifiedTime(targetFile.lastModified()); + } + } } } finally { if (tfp != null && ctxt.isPrototypeMode()) {