I modified the FTP suggestion of Auss in a way that it is NOT an applet
(applets are to restricked to begin with).
But I got the next error listening, which shows
that the thing breaks down from the
buffered reader, right?
any suggestions what is going on
FTP is open
ftp://willemii.orgfree.com:FTP_PASSW...ages/principal
sun.net.ftp.FtpLoginException: Not logged in
FTP did not work out
at sun.net.ftp.FtpClient.readReply(FtpClient.java:231 )
at sun.net.ftp.FtpClient.issueCommand(FtpClient.java: 193)
at sun.net.ftp.FtpClient.login(FtpClient.java:516)
at sun.net.
http://www.protocol.ftp.FtpURLConnec...tion.java:276)
at sun.net.
http://www.protocol.ftp.FtpURLConnec...tion.java:352)
at slideshowapplet.Main.readFileList(Main.java:47)
at slideshowapplet.Main.<init>(Main.java:28)
at slideshowapplet.Main.main(Main.java:32)
so here is the main part:
private boolean readFileList() {
BufferedReader in = null;
java.net.URLConnection con = null;
try{
URL url = new URL(WEBSITE_FTP + File.separator + "tryoutwebsite" +
File.separator + "slideshowImages" +
File.separator + "principal");
con = url.openConnection();
System.out.println(" FTP is open " + url);
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String line = in.readLine();
System.out.println(" buffered reader initialized ");
while(line!=null) {
String res = parseLine(line);
if(res!=null)
{
fileList.add(res.trim());
}
line = in.readLine();
}
in.close();
return true;
}catch(Exception ex){
ex.printStackTrace();
System.out.println(" FTP did not work out ");
}
return false;
}
private String parseLine(String line) {
System.out.println(" --> " + line);
return line;