tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r616556 - /tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
Date Tue, 29 Jan 2008 23:14:48 GMT
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


Mime
View raw message