File System

Hi all,

I tried upload and download using apache commons. but still i get strange error. could not resolve it. Ok this is my scenario.

My application should allow the user to upload and download files between their local machine and server. We are doing a project something similar to CVS. Now when the user uploads the file he/she just selects the source path and doesnt know where the file will be saved in the server (ie. destination path) Application takes care of this.

Server here i dont mean app server like tomcat or sun. Its our company server. Say for eg. if they select project1 and upload the file it should be saved in the project1 folder in the server. But the location in which the project1 folder resides in server will not be mapped to the user. If it is mapped i can easily do File/Folder copy from local machine to project1 folder.

To achieve the above task thought of doing like this. When the user submits the form to upload

1) Copy the file to a folder in App server (Tomcat or Sun).

2) The system in which the app server runs has all rights to the location in which project1 folder resides. It will be mapped. So move the file which was copied from the user local machine to folder in App server, to the project1 folder ,which is in the companies server.

Is this the right way to achieve the requirement? Eventually the task is to copy the files from user machine to project1 folder in companies server which will not be mapped. Iam i going wrong?

For the first point i tried using apache commons. but all in vain. could not figure why such error occured. this is the thread for that problem

http://forum.java.sun.com/thread.jspa?threadID=5190606

So i tried with another program which did the task.(but still have problem in uploading large files).

For the second point i did normal file copy program. I know the project1 folder location and i pass it as the destination path. But what happens here is it searches for the mapped drive in the client machine and not in the app servers machine coz only the app server machine has the project1 folder location mapped in it.

It would be helpful for me if some one suggest me a way to do this task. Iam completely new to using java file system operations. But still i can manage with online materials. But iam stuck as how to proceed with this?

[2392 byte] By [thanua] at [2007-11-27 9:32:30]
# 1
any suggestions?
thanua at 2007-7-12 22:50:14 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...