you have to use absolute pathes when doing file I/O
but you can use System.getProperty("user.dir");
to get your "home" directory
> Hi !
>
> I'm trying to create a file object using relative pathnames.
> But, I can't find the good syntax for the paths.
>
> Let's say my home directory is like that :
> /home/httpd/servlets/
> /home/httpd/html/
> The servlet is in the sevlets directory and I want to create a File with
> the path to the html directory.
> I tried :
> File toto = new File("../html/");
> but it doesn't work...
> I think I might need to use a relative path name from where the servlet is
> loaded, but I don't know how to find that.
>
> Thanks for your help,
> Stefan
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html