Author: markt
Date: Sat May 12 16:28:52 2007
New Revision: 537530

URL: http://svn.apache.org/viewvc?view=rev&rev=537530
Log:
Fix bug 42354. Space sin installation path prevented JARs being scanned for 
TLDs.

Modified:
    
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java?view=diff&rev=537530&r1=537529&r2=537530
==============================================================================
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
 Sat May 12 16:28:52 2007
@@ -26,6 +26,8 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
@@ -68,9 +70,6 @@
     private static org.apache.commons.logging.Log log=
         org.apache.commons.logging.LogFactory.getLog( TldConfig.class );
 
-    private static final String FILE_URL_PREFIX = "file:";
-    private static final int FILE_URL_PREFIX_LEN = FILE_URL_PREFIX.length();
-
 
     /*
      * Initializes the set of JARs that are known not to contain any TLDs
@@ -688,7 +687,12 @@
                     // This is definitely not as clean as using JAR URLs either
                     // over file or the custom jndi handler, but a lot less
                     // buggy overall
-                    File file = new File(urls[i].getFile());
+                    File file;
+                    try {
+                        file = new File(new URI(urls[i].toString()).getPath());
+                    } catch (URISyntaxException e1) {
+                        continue;
+                    }
                     try {
                         file = file.getCanonicalFile();
                     } catch (IOException e) {

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=537530&r1=537529&r2=537530
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sat May 12 16:28:52 2007
@@ -72,6 +72,10 @@
         ApplicationDispatcher. (markt)
       </fix>
       <fix>
+         <bug>42354</bug>: Ensure JARs in webapps are scanned for TLDs when the
+         Tomcat installation path contains spaces. (markt)
+      </fix>
+      <fix>
          <bug>42361</bug>: Handle multi-part forms when saving requests during
          FORM authentication process. Patch provided by Peter Runge. (markt)
       </fix>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to