Fix bug 43741. Tag files in JARs were getting compiled once for every JSP that used...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 Jan 2008 23:14:23 +0000 (23:14 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 Jan 2008 23:14:23 +0000 (23:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@616556 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/JspCompilationContext.java

index b98e6fe..5741056 100644 (file)
@@ -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;