cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Developers docs out of date?
Date Wed, 04 Dec 2002 14:36:29 GMT
todd wrote:

>Vadim;
> Hello... can you tell me how you fixed this problem on Cocoon so I can tell the jetspeed
folks.
>  
>

Yes, sure... Code snippet below does the trick:

        try {
            if (path.indexOf(':') > 1) {
                this.servletContextURL = new URL(path);
            } else {
                this.servletContextURL = new File(path).toURL();
            }
        } catch (java.net.MalformedURLException me) {
            // VG: Novell has absolute file names starting with the
            // volume name which is easily more then one letter.
            // Examples: sys:/apache/cocoon or sys:\apache\cocoon
            try {
                this.servletContextURL = new File(path).toURL();
            } catch (java.net.MalformedURLException ignored) {
                throw new ServletException("Unable to determine servlet 
context URL.", me);
            }
        }

"if" is for Windows, "else" for URLs, and inside "catch" special case 
for Novell.

Vadim


> DO NOT REPLY [Bug 14917] New: - java.net.MalformedURLException: unknown protocol: vol1
 
>
>greets
>
>todd
>http://www.wiserlabz.com
>  
>



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


Mime
View raw message