有人用apache的ftp包進行訪問FTP么?
<%@ page contentType="text/html; charset=Big5" %>
<%@ page import ="org.apache.commons.net.ftp.*"%>
<%
FTPClient ftp = new FTPClient();
ftp.connect("172.24.14.229");//ip地址.
ftp.login("atonet","***");//用戶名密碼.
int aaa = ftp.getDefaultPort();
String bbb = ftp.getReplyString();
int remotePort = ftp.getRemotePort();
String[] name = ftp.listNames();
FTPFile[] listFile = ftp.listFiles();
我一執行到上面這步的時候就出錯,不知到怎么回事!
<%@ page import ="org.apache.commons.net.ftp.*"%>
<%
FTPClient ftp = new FTPClient();
ftp.connect("172.24.14.229");//ip地址.
ftp.login("atonet","***");//用戶名密碼.
int aaa = ftp.getDefaultPort();
String bbb = ftp.getReplyString();
int remotePort = ftp.getRemotePort();
String[] name = ftp.listNames();
FTPFile[] listFile = ftp.listFiles();
我一執行到上面這步的時候就出錯,不知到怎么回事!
...全文
相关推荐
ftp搭建并实现http访问
使用ftpserver和tomcat完成ftp服务器搭建,并实现在web项目中直接使用http请求访问资源。内置详细操作文档和所需资源,环境为Win7 64位。
【Apache】Web 服务器配置与 FTP 服务器配置
本文详细介绍了如何配置Apache服务器,包括更改默认端口为8080,设置DocumentRoot,创建虚拟目录,设置默认访问文件,以及通过Apache进行文件上传。同时,文章还探讨了FTP服务器的配置,如匿名FTP的设置,限制目录浏览,以及FileZilla Server的安全设置和速度限制。此外,还对比了www上传和ftp上传的区别,并强调了安全端口和密码的重要性。
ubuntu创建sftp+ftp+apache服务器以及实际工程中的应用
本文详细介绍了在Ubuntu上搭建sftp、ftp和apache服务器的过程,包括需求分析、创建sftp和ftp服务器,以及配置apache服务器以访问上传文件。重点在于sftp和ftp共用用户和目录,确保app和客户端能上传文件至同一位置,并通过apache进行访问。
FTP依赖jar包,最新版
commons-net-3.1,httpclient-4.3.5,httpcore-4.4.5,最新稳定版
org.apache.commons.net.ftp.FTPClient包
org.apache.commons.net.ftp.FTPClient包,不错,在实际项目和产品中使用过。


Web 开发
