----- Original Message -----
From: "Li Bing" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
> My servlet wishes to create a text file on server. But after running the
> servlet, there is no file existed under the server's servlet directory.
> But
> the code that creates a text file can do that if it is not put into a
> servlet. Why? The web server is iPlanet on Window NT.
Does this mean that the file creation fails(with an exception) or that the
file gets created somewhere else?
If the file is getting created at someplace other than expected, then try to
give the absolute path of the location where you want the file to be
created(if you have not done so)? If the path given for the file is
relative, then it is relative to the current working directory of the
container which may vary from container to container.
If you want to find the current directory of the container, this following
code can get it for you.
File currentDir = new File(".");
String canonicalPath = currentDir.getCanonicalPath();
If this does not seem to be your problem, post the relevant piece of code to
the list.
Regds,
Gokul
>
> Thanks,
> Li Bing
___________________________________________________________________________
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