javaʵÏÖµÄftpÎļþÉÏ´«ÀýÌâ
1£ºÓÃhttpÐÒéÉÏ´«¸üÊʺÏweb±à³ÌµÄ·½±ã£»´«Ð¡ÓÚ1MÎļþËÙ¶ÈÒª±ÈÓÃftpÐÒéÉÏ´«ÎļþÂÔ¿ì¡£°²È«ÐԺ㻲»ÏñftpÄÇÑù£»±ØÐëÒªÆô¶¯Ò»¸öftp·þÎñ²ÅÐС£
2£ºÓÃftpÐÒéÉÏ´«Îļþ´óÓÚ1MµÄÎļþËٶȱÈhttp¿ì£»ÎļþÔ½´ó£»ÉÏ´«µÄËٶȾͱÈhttpÉÏ´«¿ìµÄ±¶ÊýÔ½´ó¡£¶øÇÒÓÃjava±àд³ÌÐò£»ftp±Èhttp·½±ã¡£ºÃ£¬·Ï»°ÉÙ˵£»ÎÒÃÇÏȴһ¸öʵÀýÀ´ÀíÐÔÈÏʶһÏÂÓÃjava±àдftpÉÏ´«ÎļþµÄ¼¼Êõ¡£
Ê×ÏÈÔÚ±¾»úÆô¶¯Ò»¸öftp·þÎñ£¬ftpµÄÓû§£º"IUSR_ZJH"
ÃÜÂ룺"123"£»ËæºóÔÚftpÖ÷Ŀ¼Ï½¨Ò»¸öÃûΪupftpµÄ×ÓĿ¼£»ÏÂÃæÓÐ4¸öÎļþ¾Í¿ÉÆô¶¯Õâ¸öÀýÌâÁË¡£
Îļþ1£ºMainCtrl.java£¨servletÎļþ£©ÄÚÈÝÈçÏ£º
import javax.servlet.http.HttpServlet;
import
javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse;
import
javax.servlet.ServletException;
import java.io.FileInputStream;
import
java.io.IOException;
import sun.net.TelnetOutputStream;
import
sun.net.ftp.FtpClient;
public class MainCtrl extends HttpServlet
{
private FtpClient ftpClient;
public void
doPost(HttpServletRequest req, HttpServletResponse resp)
throws
ServletException, IOException {
resp.setContentType("text/html;
charset=UTF-8");
try {
//Á¬½Óftp·þÎñÆ÷
connectServer("127.0.0.1", "IUSR_ZJH", "123",
"upftp");
//ÉÏ´«Îļþ;²¢·µ»ØÉÏ´«ÎļþµÄÐÅÏ¢
req.setAttribute("inf",
upload(req.getParameter("file_name")));
} catch (Exception e)
{
System.out.println(e.toString());
req.setAttribute("inf",
e.toString());
req.getRequestDispatcher("view_inf.jsp").forward(req,
resp);
return;
} finally {
if (ftpClient != null) {
ftpClient.closeServer();
}
}
req.getRequestDispatcher("view_inf.jsp").forward(req, resp);
}
public void doGet(HttpServletR
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
Ò»¡¢±³¾°
×î½üÒ»Äê¶àÀ´,ÔÚInternetÉϳöÏÖµÄÌرðÎüÒýÈ˵Äʼþ¾ÍÊÇJavaÓïÑÔºÍÓÃJava±àдµÄä¯ÀÀÆ÷HotJava¡£
1991Äê,SUNMicroSystem¹«Ë¾µÄJameGosling¡¢BillJoeµÈÈË,ΪÔÚµçÊÓ¡¢¿ØÖÆ¿¾Ãæ°üÏäµÈ¼ÒÓÃÏû·ÑÀàµç×Ó²úÆ·ÉϽøÐн»»¥Ê½²Ù×÷¶ø¿ª·¢ÁËÒ»¸öÃûΪOakµÄÈí¼þ(¼´Ò»ÖÖÏðÊ÷µÄÃû×Ö),µ«µ±Ê±²¢Ã»ÓÐÒýÆðÈËÃǵÄ×¢Òâ,Ö±µ½1 ......
Ò»¡¢PythonÖеÄÎļþ¹ÜÀí
Îļþ¹ÜÀíÊǺܶàÓ¦ÓóÌÐòµÄ»ù±¾¹¦ÄܺÍÖØÒª×é³É²¿·Ö¡£Python¿ÉÒÔʹÎļþ¹ÜÀí¼«Æä¼òµ¥£¬ÌرðÊǺÍÆäËüÓïÑÔÏà¶Ô±È¡£
ÒÔÏ£¬Peyton McCullough½²½âÁËÎļþ¹ÜÀí»ù´¡¡£
½éÉÜ
ÄãÍæ¹ýµÄÓÎϷʹÓÃÎļþÀ´±£´æ´æµµ£»ÄãϵĶ©µ¥±£´æÔÚÎļþÖУ»ºÜÃ÷ÏÔ£¬ÄãÔçÉÏдµÄ±¨¸æÒ²±£´æÔÚÎļþÖС£
¼¸ºõÒÔÈκÎÓïÑÔ±àдµÄÖÚ¶àÓ ......
Óû§ÒªÇóͳ¼ÆËùÌṩ¹Ø¼ü×ÖÔÚÍøÂç³öÏÖµÄÐÂÎÅ£¬ÏÂÃæΪһ¸ö²âÊÔµÄmain·½·¨¡£
package com.net;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
impo ......
¡¡¡¡¡¡Spring Framework ¡¾Java¿ªÔ´ J2EE¿ò¼Ü¡¿
¡¡¡¡Spring ÊÇÒ»¸ö½â¾öÁËÐí¶àÔÚJ2EE¿ª·¢Öг£¼ûµÄÎÊÌâµÄÇ¿´ó¿ò¼Ü¡£ SpringÌṩÁ˹ÜÀíÒµÎñ¶ÔÏóµÄÒ»Ö·½·¨²¢ÇÒ¹ÄÀøÁË×¢Èë¶Ô½Ó¿Ú±à³Ì¶ø²»ÊǶÔÀà±à³ÌµÄÁ¼ºÃÏ°¹ß¡£SpringµÄ¼Ü¹¹»ù´¡ÊÇ»ùÓÚʹÓÃJavaBeanÊôÐ﵀ Inversion of ControlÈÝÆ÷¡£È»¶ø£¬Õâ½ö½öÊÇÍêÕûͼ¾°ÖеÄÒ»²¿·Ö£ºSpringÔ ......