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/05/15 21:26:47 UTC

svn commit: r656800 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/startup/ClassLoaderFactory.java java/org/apache/jasper/JspCompilationContext.java webapps/docs/changelog.xml

Author: markt
Date: Thu May 15 12:26:47 2008
New Revision: 656800

URL: http://svn.apache.org/viewvc?rev=656800&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=43150
Start if the installation path contains #

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=656800&r1=656799&r2=656800&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu May 15 12:26:47 2008
@@ -51,12 +51,6 @@
   +1: jfclere, rjung, fhanik, remm, pero
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=43150
-  Start if the installation path contains #
-  http://svn.apache.org/viewvc?rev=652669&view=rev
-  +1: markt, remm, pero
-  -1: 
-
 * Possible NPE in EL (one liner regression fix in org.apache.el.lang.ELSupport)
 @@ -343,7 +343,7 @@
      public final static Object coerceToType(final Object obj, final Class type)

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java?rev=656800&r1=656799&r2=656800&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java Thu May 15 12:26:47 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/tc6.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=656800&r1=656799&r2=656800&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java Thu May 15 12:26:47 2008
@@ -651,19 +651,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"));
                 }

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=656800&r1=656799&r2=656800&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu May 15 12:26:47 2008
@@ -47,6 +47,10 @@
         using the webapp class loader when we create them. (markt)
       </fix>
       <fix>
+        <bug>43150</bug>: Allow Tomcat to start correctly when installed on a
+        path that contains a # character. (markt)
+      </fix>
+      <fix>
         <bug>43343</bug>: Correctly handle requesting a session we are in the
         middle of persisting. Based on a suggestion by Wade Chandler. (markt)
       </fix>



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