From 3a1d4098cedb5d65592bb37969055aad249b2ba5 Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 29 Jan 2008 23:14:23 +0000 Subject: [PATCH] Fix bug 43741. Tag files in JARs were getting compiled once for every JSP that used them. Patch provided by Anthony Berglas. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@616556 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/JspCompilationContext.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/java/org/apache/jasper/JspCompilationContext.java b/java/org/apache/jasper/JspCompilationContext.java index b98e6fe35..574105686 100644 --- a/java/org/apache/jasper/JspCompilationContext.java +++ b/java/org/apache/jasper/JspCompilationContext.java @@ -559,7 +559,15 @@ public class JspCompilationContext { public void compile() throws JasperException, FileNotFoundException { createCompiler(); - if (isPackagedTagFile || jspCompiler.isOutDated()) { + boolean outDated; + if (isPackagedTagFile) { + // Tags in JARs only need to be compiled once + // If the JAR changes, the app needs to be re-loaded + outDated = !(new File(getClassFileName()).exists()); + } else { + outDated = jspCompiler.isOutDated(); + } + if (outDated) { try { jspCompiler.removeGeneratedFiles(); jspLoader = null; -- 2.11.0