🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1920

How to use ipworks.ftp to show list of remote files

#1920
From: Fang Jing
Date: Thu, 16 Aug 2001 09:32
42 lines
2221 bytes
First I write a function to connect to the ftpserver(netflow FTP server)
(SunOS 5.8) ready,
Then I use      aftp.setRemoteFile("/opt");
           aftp.setAction(Ftp.a_ListDirectoryLong);

  to show the files of the directory,
  but the first connection to the server seems to be lost, and the second
connection to the server is established(netflow FTP server (SunOS 5.8)
ready), then the message (1530 Please login with USER and PASS) is shown
and the excepion message is (FTP protocol error. 530 Please login with USER
and PASS)


  Would you please tell me how to fix this problem?
  My Jbuilder version is Jbuilder 5
  Thank you very much!



The following lines are used to connect to the server, and it seems to be
fine
        aftp.setPassword(pwd);
        aftp.setRemoteHost(hostname);
        aftp.setTransferMode(Ftp.tm_ASCII);
        aftp.setUser(uid);
        aftp.setLocalFile(datadir);//����Ŀ�ĵ�ַ


        aftp.setAction(Ftp.a_Logon);


        /*
        System.out.println("before cd /opt");
      aftp.setRemotePath("/opt");
        System.out.println("after cd /opt");
*/

        } catch(Exception e){
              System.out.println("���ӷ�������:"+hostname);
              return false;}

        System.out.println("���ӵ�������:"+hostname);
Technical Details
Message-ID: <3b7b939b_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,d2d6351afe92496d,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-08-16 02:44:09 PST
From: "Fang Jing" <fangjing21@chinaren.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: How to use ipworks.ftp to show list of remote files
Date: Thu, 16 Aug 2001 17:32:27 +0800
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 61.153.17.161
Message-ID: <3b7b939b_2@dnews>
X-Trace: dnews 997954459 61.153.17.161 (16 Aug 2001 02:34:19 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews