Hello Christian,
Thanks
it works...
i m facing onw more problem...
uptill now i was
testing uploading of file from my m/c only .. means client and server was on same m/c
today i tried to upload from my colleague's m/c,
from 1 m/c it is working, i tried from 2-3 m/c more and it is not working..
but could be the reason.... here below is my code sample..
file_name="//"+request.getRemoteHost()+"/"+file_name;
int o=file_name.indexOf(':');
file_name=file_name.substring(0,o)+file_name.substring(o+1);
file_name=file_name.replace('\\','/');
int f=file_name.lastIndexOf("/");
newdemopath=file_name.substring(f+1);
int y;
String upload_file = application.getRealPath("/bhi/brochures/"+newdemopath);
FileInputStream fis = new FileInputStream(new File(file_name));
FileOutputStream fos = new FileOutputStream(new File(upload_file));
do
{
y=fis.read();
if(y !=-1)
fos.write(y);
}while(y !=-1);
fos.close();
fis.close();
thanks for help..
Sunil Bansal