You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by todd <tl...@wiserlabz.com> on 2002/12/04 01:55:46 UTC
Re: Developers docs out of date?
Vadim;
Hello... can you tell me how you fixed this problem on Cocoon so I can tell the jetspeed folks.
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
Re: Developers docs out of date?
Posted by Vadim Gritsenko <va...@verizon.net>.
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