hi all,
i had developed an applet. This applet having one frame class. This applet is called inside a jsp page.The Process of this page is copying files from one folder to another folder in server. Actually this process is working fine in first time. but the problem is i am closing the Applet window not closing the browser. if i reload that applet means the applet is loading but when i am copying a file from SAMBA server then it throw an Exception like:
The Exception is====> jcifs.smb.SmbException:
jcifs.util.transport.TransportException: Transport1[0.0.0.0<00>/172.16.2.1:445] timedout waiting for response to Trans2QueryPathInformation[command=SMB_COM_TRANSACTION2,received=false,errorC ode=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=1,p id=7121,uid=100,mid=224,wordCount=15,byteCount=103 ,totalParameterCount=102,totalDataCount=0,maxParam eterCount=2,maxDataCount=40,maxSetupCount=0,flags= 0x00,timeout=0,parameterCount=102,parameterOffset= 66,parameterDisplacement=0,dataCount=0,dataOffset= 168,dataDisplacement=0,setupCount=1,pad=1,pad1=0,i nformationLevel=0x101,filename=\TEST_AUG18-9780123699999\Latex-P369999\Ch01-v4]
at jcifs.smb.SmbTransport.send(SmbTransport.java:589)
my code is :
Code:
String sourceurl="smb://" + serverusername+":" + serverpassword+"@" + serverip + "/" + filename ; //source file path in samba server
String destinationurl="smb://" + serverusername+":" + serverpassword + "@" + serverip + "/" + servernewfolder + "/" + filename; // copy file to already available folder
SmbFileInputStream in = new SmbFileInputStream(sourceurl);
SmbFileOutputStream out = new SmbFileOutputStream(destinationurl);
if((in != null) && (out != null))
{
System.out.println("file copy");
out = new SmbFileOutputStream(destinationurl);
byte[] buf1 = new byte[1024];
int len1;
while((len1 = in.read(buf1)) > 0)
{
out.write(buf1, 0, len1);
}
in.close();
in = null;
out.close();
out.flush();
out = null;
}
can any one solve my problem please..................