tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1742105 - in /tomcat/trunk: java/org/apache/jasper/servlet/TldScanner.java webapps/docs/changelog.xml
Date Tue, 03 May 2016 11:51:02 GMT
Author: markt
Date: Tue May  3 11:51:02 2016
New Revision: 1742105

URL: http://svn.apache.org/viewvc?rev=1742105&view=rev
Log:
Javadoc for scanWebInfClasses() explicitly states that access should only be via the ServletContext
so access the files that way.

Modified:
    tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java?rev=1742105&r1=1742104&r2=1742105&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java (original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java Tue May  3 11:51:02 2016
@@ -394,13 +394,18 @@ public class TldScanner {
             // JARs have been unpacked into WEB-INF/classes as happens with some
             // IDEs.
 
-            // We know that WEB-INF/classes/META-INF must be a directory on disk
-            String webappPath = WEB_INF + "classes";
-            String realPath = context.getRealPath(webappPath);
+            Set<String> paths = context.getResourcePaths(WEB_INF + "classes/META-INF");
 
-            File webInfClasses = new File(realPath);
-
-            scan(webInfClasses, webappPath, true);
+            for (String path : paths) {
+                if (path.endsWith(TLD_EXT)) {
+                    String webappPath = WEB_INF + "classes/META-INF" + path;
+                    try {
+                        parseTld(webappPath);
+                    } catch (SAXException e) {
+                        throw new IOException(e);
+                    }
+                }
+            }
         }
 
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1742105&r1=1742104&r2=1742105&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue May  3 11:51:02 2016
@@ -235,6 +235,15 @@
       </update>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        When scanning JARs for TLDs, correctly handle the (rare) case where a
+        JAR has been exploded into <code>WEB-INF/classes</code> and the web
+        application is deployed as a packed WAR. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="WebSocket">
     <changelog>
       <fix>



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


Mime
View raw message