tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42202] - if you install tomcat in a directory with spaces it ignores TLD files inside jar files
Date Mon, 23 Apr 2007 22:43:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42202>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42202





------- Additional Comments From rodrigo@urubatan.com.br  2007-04-23 15:43 -------
in the current code tomcat gets all the URLs from the URLClassloader, and call
the getFile() method to get the file name, after it creates a File object and
gets the CanonicalName to create the final File object that will be used later ...
but the CanonicalName when it is running on windows and has spaces on the name,
is some thing like:
Program%20Files/...
when the file object is created, and the exists method is called it returns
false because the File object does not know how to convert %20 to " " ...
if you look at the code in the patch, instead of calling the getFile, creating a
File object, getCanonicalName, create another File object that does not know how
to handle %20 ...

I just take the original URL object, call the toURI method and pass it to the
apropriate File constructor that will handle the %20 correctly ...

with this patch it works fine, and loads the TLDs from the applications that are
in directories with spaces in the names ...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message