W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 1998

Re: Loading Files

From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
Date: Wed, 08 Apr 1998 09:02:48 +0200
Message-Id: <199804080702.JAA16166@www43.inria.fr>
To: Tom Carmichael <pro2@oak.njit.edu>
cc: www-jigsaw@w3.org
pro2@oak.njit.edu writes:

> If I have a HTTP Resource under 1.0b1 that wants to load a file from the
> server, where does the file need to be located?  I put it under WWW and
> get a FileNotFoundException.  

 You can put your file where you want. For example if you put it under WWW
 you can load it with:

 File myfile = new File( getServer().getRootDirectory(), 
                         "WWW/"+myfilename );

 But it's not a good idea to put it there, this directory is supposed to
 contains exported resources. So the best thing to do is to create your 
 own directory under the root directory (ie: myconfig) and to load your
 file with:

 File myfile = new File( getServer().getRootDirectory(), 
                         "myconfig/"+myfilename ); 

>How would this differ (if at all) under 2.0a?

 There'is no difference between 2.0 and 1.0 for this kind of things.


- Benoît Mahé -------------------------------------------------------
                      World Wide Web Consortium (W3C)
                    Architecture domain - Jigsaw Team           

  http://www.w3.org/People/Mahe - bmahe@w3.org - + 
Received on Wednesday, 8 April 1998 03:03:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:32 UTC