tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r652669 - in /tomcat/trunk/java/org/apache: catalina/startup/ClassLoaderFactory.java jasper/JspCompilationContext.java
Date Thu, 01 May 2008 21:25:01 GMT
Author: markt
Date: Thu May  1 14:25:01 2008
New Revision: 652669

URL: http://svn.apache.org/viewvc?rev=652669&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=43150
# in installation path stops Tomcat starting

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
    tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java?rev=652669&r1=652668&r2=652669&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java Thu May  1 14:25:01
2008
@@ -121,7 +121,7 @@
                 if (!file.exists() || !file.canRead())
                     continue;
                 file = new File(file.getCanonicalPath() + File.separator);
-                URL url = file.toURL();
+                URL url = file.toURI().toURL();
                 if (log.isDebugEnabled())
                     log.debug("  Including directory " + url);
                 list.add(url);
@@ -143,7 +143,7 @@
                     File file = new File(directory, filenames[j]);
                     if (log.isDebugEnabled())
                         log.debug("  Including jar file " + file.getAbsolutePath());
-                    URL url = file.toURL();
+                    URL url = file.toURI().toURL();
                     list.add(url);
                 }
             }
@@ -201,7 +201,7 @@
                     if (!directory.exists() || !directory.isDirectory() ||
                         !directory.canRead())
                          continue;
-                    URL url = directory.toURL();
+                    URL url = directory.toURI().toURL();
                     if (log.isDebugEnabled())
                         log.debug("  Including directory " + url);
                     list.add(url);
@@ -210,7 +210,7 @@
                     file = new File(file.getCanonicalPath());
                     if (!file.exists() || !file.canRead())
                         continue;
-                    URL url = file.toURL();
+                    URL url = file.toURI().toURL();
                     if (log.isDebugEnabled())
                         log.debug("  Including jar file " + url);
                     list.add(url);
@@ -234,7 +234,7 @@
                         if (log.isDebugEnabled())
                             log.debug("    Including glob jar file "
                                 + file.getAbsolutePath());
-                        URL url = file.toURL();
+                        URL url = file.toURI().toURL();
                         list.add(url);
                     }
                 }

Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=652669&r1=652668&r2=652669&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Thu May  1 14:25:01 2008
@@ -656,19 +656,19 @@
     protected void createOutputDir() {
         String path = null;
         if (isTagFile()) {
-	    String tagName = tagInfo.getTagClassName();
-            path = tagName.replace('.', '/');
-	    path = path.substring(0, path.lastIndexOf('/'));
+            String tagName = tagInfo.getTagClassName();
+            path = tagName.replace('.', File.separatorChar);
+            path = path.substring(0, path.lastIndexOf(File.separatorChar));
         } else {
-            path = getServletPackageName().replace('.', '/');
-	}
+            path = getServletPackageName().replace('.',File.separatorChar);
+        }
 
             // Append servlet or tag handler path to scratch dir
             try {
-                baseUrl = options.getScratchDir().toURL();
-                String outUrlString = baseUrl.toString() + '/' + path;
-                URL outUrl = new URL(outUrlString);
-                outputDir = outUrl.getFile() + File.separator;
+                File base = options.getScratchDir();
+                baseUrl = base.toURI().toURL();
+                outputDir = base.getAbsolutePath() + File.separator + path + 
+                    File.separator;
                 if (!makeOutputDir()) {
                     throw new IllegalStateException(Localizer.getMessage("jsp.error.outputfolder"));
                 }



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


Mime
View raw message