DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983

RMI call from Web Application throws SocketException if CATALINA_HOME has a space in it





------- Additional Comments From [EMAIL PROTECTED]  2004-02-11 18:19 -------
I was able to fix this problem by changing the getURL method in the 
Webappclassloader. Also, i've only tested this with 4.1.29 so, even though i 
think this will work with other versions, its not been tested with those.

Here is the new getURL method
    
    protected URL getURL(File file)
        throws MalformedURLException {

        File realFile = file;
        try {
            realFile = realFile.getCanonicalFile();
        } catch (IOException e) {
            // Ignore
        }

        String fileStr = "file:" + realFile.getPath();
                StringBuffer sb = new StringBuffer(fileStr.length());
                for(int i=0; i< fileStr.length();i++)
                {
                        char c = fileStr.charAt(i);
                        if(c != ' ')
                        {
                                sb.append(c);
                        }
                        else
                        {
                                sb.append("%20");
                        }
                }
        return new URL(sb.toString());
    }

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

Reply via email to