You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/01/30 00:14:48 UTC

svn commit: r616556 - /tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java

Author: markt
Date: Tue Jan 29 15:14:23 2008
New Revision: 616556

URL: http://svn.apache.org/viewvc?rev=616556&view=rev
Log:
Fix bug 43741. Tag files in JARs were getting compiled once for every JSP that used them. Patch provided by Anthony Berglas.

Modified:
    tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java

Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=616556&r1=616555&r2=616556&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Tue Jan 29 15:14:23 2008
@@ -559,7 +559,15 @@
     
     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;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org