tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Smith <Michael.Sm...@epiphany.com>
Subject RE: Embedding tomcat problem.
Date Thu, 28 Sep 2000 02:12:43 GMT

> From: Derek DeMoro [mailto:ddemoro@home.com]
> I am running on windows, and I thought this was a valid URL using
> new URL("file:/d:/tomcat/webapps/ROOT"), but maybe not.  Any
> suggestions?

Not sure exactly why you're trying to create that particular URL, but in any
case, no, it is not a valid URL.  The proper format for URLs is something
like:

  <protocol>://<host>[/<file>] 

So, your file URL should really be:

  file:///d:/tomcat/webapps/ROOT

(note there are three /'s because there is no host value which would appear
between the second and third slash).  

And actually, a better way to create a URL object is to use the other
constructors for URL: 

  new URL("file", null, "d:/tomcat/webapps/ROOT")

The other constructors ensure the URL is properly constructed.

michael
---
Michael.Smith@epiphany.com
http://www.epiphany.com

Mime
View raw message