Hello Everyone,

Can you please give me some thoughts on how to create a folder in http(Ex: http://localhost:8080/site/myfoldertocreate) instead in a local drive (Ex. C:\MYFOLDER)

Here is the current code that I am using.

public static void createFolder(String Folder){
try{
			File f = new File(Folder);
			if(f.mkdir())
				SimpleLog.write(Folder + " Directory Created");
			else
				SimpleLog.write(Folder + " Directory is not created");
			}catch(Exception e){
			e.printStackTrace();
			} 
	}

Looking forward to your replies.

Thanks in Advance

Can't do it. I mean, don't you think that would be a huge security hole to be able to just write things onto the server?

Thanks for the reply.

Agreed. I just having problems with the shared drive in windows using http with different port. It only works on port 80.

No idea what you're saying as http and a shared drive have nothing (at least not intrinsicly) to do with each other.

I agree with masijade.. What do you mean by "having problems with the shared drive in windows using http with different port"
Those are completely two different things.

Thanks for your replies. Sorry for the confusion.

I have a IIS server running at port 80 (http://server:80/jamojo/test). I was able to map network drive this IIS server by typing \\server\jamojo\test. So in the Java Class i posted before, I was able to create folders (createFolder(X:\TESTING)). So in the server, there will be a http://server:80/jamojo/test/TESTING. But when the ISS server is running in different port, I cannot map a network drive. I agreed with masijade, it will be a security issue.

Hope this clarify this concern.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.