Drive dilemma

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Here is my situation: I have a .war file that calls an index.html file
from a shared directory. That works great, but unfortunately the c:
drive on my server is running low on space, so the server admin wants
my shared directories to be moved to the d: drive. I have modified the
index.html file on the c: drive being accessed by my .war file to load
another index.html file on the d: drive, but it is not working. I have

<BODY onLoad="document.location.href='d:\index.html'">


<SCRIPT LANGUAGE="JavaScript"><!--
function go_now () {
location.href = "D:/index.html";
<BODY onLoad="go_now ()">

Any ideas? Thanks!

Re: Drive dilemma

Quoted text here. Click to load it

Well, you can't seem to make up your mind whether to use backslashes
or forward slashes (in URLs, forward slashes are always the correct
thing to use for indicating directory paths, regardless of what the
local operating system may happen to use), but neither version as you
use it is a proper URL.  If this is intended to be used on your local
machine (rather than through the Web), then you need to find the
proper formulation of the path to your other drive as a "file:" URL,
like "file:///D:/index.html" (this might depend on how your system is
set up).  You might find that, depending on what browser you're using
and how it's configured there may be security settings that prevent
such access.

If it's on the Web, you need to know how the server is set up to serve
one or both of these drives within a hostname or IP address under HTTP


Re: Drive dilemma


Quoted text here. Click to load it

If you can work a .war file, you can work a web server.  Use http://
protocol in your URLs, not file:// and never let a drive letter be any
part of it.

And why do you need a war file anyway? If you're not deploying it to a
servlet container (i.e. a web server + java) then why can't you just use
a .jar fiel to containa command-line app?

Site Timeline