The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Originally posted by Megan Hill:
Is it possible to create a folder or a file on the web server from a servlet?
If so, How can I do it ?
You surely can create a folder on the web server. But only if the folder is inside the context of the servlet. I do not think that if you are trying to create a folder outside the context you will be able to do it.
Let me know if I am correct.
You surely can create a folder on the web server. But only if the folder is inside the context of the servlet.
I have no idea what is meant by this.
Eseentially, you can manipulate the file system on the server (since that is where your servlet code is running) in any way that is allowed by the file-system persmissions granted to the user under which the web server is being executed.
And as pointed out earlier, the java.io classes are the mean you would use just like any other Java program.
[ August 25, 2003: Message edited by: Bear Bibeault ]
Your only restriction is that whatever OS filesystem security is in effect for the user and group IDs that the server runs under applies to the java code as well.