Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FTP FILE DOWNLOAD PROBLEM  RSS feed

 
mamun pratra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am using commons-net-1.4.1 to create an FTP conection.And the connection is successfully generating after passing the FTP url,username and password .

But problem is when i am trying to run the code and download a file using a standalone applin its downloading the file successfully.

But when i am deploying that code in JBOSS server its connecting successfully to the FTP site but its not downloading the file.

Its giving me false in the retrieveFile() method.


String localFileNameWithTimeStamp = getLocalFileNameWithTimeStamp();
FileOutputStream fileOutputStream = getFileOutPutStream(localFileNameWithTimeStamp);
if (fileOutputStream != null) {
getFtpClient().setFileType(FTPClient.BINARY_FILE_TYPE);
boolean downLoad = getFtpClient().retrieveFile(getRemoteFileName(), fileOutputStream);
if (downLoad)
fileOutputStream.close();



The above boolean value "downLoad" is coming as null when i am deploying into JBOSS server .

Can anybody help me on this why its happening like this.


Thnx in advance

Regards
Debapriya
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!