portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14917] - java.net.MalformedURLException: unknown protocol: vol1
Date Wed, 04 Dec 2002 17:17:52 GMT
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=14917>.
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=14917

java.net.MalformedURLException: unknown protocol: vol1





------- Additional Comments From tlt@wiserlabz.com  2002-12-04 17:17 -------
Once again, Vadim comes through, a statement as to the excellence of the
Apache.org community, outstanding... below is the snippet needed for fixing this
error

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

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message