[jboss-user] [EJB 3.0] - Uploading multiple files from Client to server
kaviarasu
do-not-reply at jboss.com
Wed Jan 2 06:33:45 EST 2008
Hi
i want to upload all files from a folder in Client to Server
Im using jsf as a front ent
When if i test it in client side with Server in same machine and checks for the folder and upload all files it working
But when the server is in remote palce how to upload all files from client folder to the server
I pasted my sample coding . I browse one file from the folder and using that i find the path to the folder and upload all fles from the folder
File f=new File(vname1);
File f1=new File(f.getParent());
int i=0;
if(f1.isDirectory())
{
for(File a:f1.listFiles())
{
FileInputStream fr = new FileInputStream(a); FileOutputStream fw = new FileOutputStream(new File(location1,a.getName()));
while((i=fr.read())!=-1)
{
fw.write(i);
}
fw.close();
fr.close();
}
the above code works when the server is in same machine
when the server is in remote place it not working
Thanks in advance
happy new year
Regards
Kaviarasu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116355#4116355
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116355
More information about the jboss-user
mailing list