tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <je...@ptc.com>
Subject WebappClassLoader.getURLs Bug!
Date Tue, 20 Jul 2004 15:19:05 GMT
In Tomcat 4.1.x, I discovered that RMI calls from Tomcat failed when the 
any of the full file paths of the web app jars contained a space (' ') 
character.

At the time, I was told this would be fixed in Tomcat 5 and to work 
around it in Tomcat 4.1.x, which I did.

Unfortunately, now that I've moved to Tomcat 5, I discover that the bug 
is still quite present.  There is now a nice getURI() method along with 
the previous getURL() method.  Unfortunately, getURLs() does not use 
getURI( file ).toURL() or any such as it would need to for the RMI 
runtime's sake (as it calls getURLs()).

I can clearly patch WebappClassLoader.getURLs() to make such calls 
myself, but:

   1. I'm left wondering about the broader implications of doing just this.
          * In Tomcat 4.1.x, I changed getURL() to do
            canonicalFile.toURI().toURL() under Java 1.4 and a hand
            coded equivalent in previous JVMs.
          * This works quite robustly in my experience, but I'm left
            wondering what the overall best, safest, and most performant
            fix is.
   2. I don't want to keep having to maintain my own fix.  An overall
      optimal fix should be integrated into Tomcat 5 so that this issue
      ceases to be an issue for everyone using Tomcat.

--
Jess Holle


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message