• 大小: 111KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-07
  • 语言: Java
  • 标签: excel  数据库  java  ajx  

资源简介

采用了ajax技术 可以将文件上传 并显示进度条 jsp 很不错的例子哦 希望对大家有帮助

资源截图

代码片段和文件信息

package book.upload;

import org.apache.commons.fileupload.disk.DiskFileItem;

import java.io.File;
import java.io.OutputStream;
import java.io.IOException;

public class MonitoredDiskFileItem extends DiskFileItem {
private MonitoredOutputStream mos = null;
private OutputStreamListener listener;
public MonitoredDiskFileItem(String fieldName String contentType
boolean isFormField String fileName int sizeThreshold
File repository OutputStreamListener listener) {
super(fieldName contentType isFormField fileName sizeThreshold
repository);
this.listener = listener;
}
public OutputStream getOutputStream() throws IOException {
if (mos == null) {
mos = new MonitoredOutputStream(super.getOutputStream() listener);
}
return mos;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        502  2006-05-19 15:20  FileUpload\.classpath

     文件        303  2006-05-19 15:20  FileUpload\.mymetadata

     文件       1350  2006-05-19 15:20  FileUpload\.project

     文件        798  2006-05-19 15:20  FileUpload\src\book\upload\MonitoredDiskFileItem.java

     文件        834  2006-05-19 15:20  FileUpload\src\book\upload\MonitoredDiskFileItemFactory.java

     文件        855  2006-05-19 15:20  FileUpload\src\book\upload\MonitoredOutputStream.java

     文件        245  2006-05-19 15:20  FileUpload\src\book\upload\OutputStreamListener.java

     文件       2052  2006-05-19 15:20  FileUpload\src\book\upload\UploadListener.java

     文件       6649  2006-05-19 15:20  FileUpload\src\book\upload\UploadServlet.java

     文件        178  2006-05-19 15:20  FileUpload\WebRoot\itext.txt

     文件         39  2006-05-19 15:20  FileUpload\WebRoot\meta-INF\MANIFEST.MF

     文件        816  2006-05-19 15:20  FileUpload\WebRoot\MyHtml.html

     文件        203  2006-05-19 15:20  FileUpload\WebRoot\periodcal.jsp

     文件      47445  2006-05-19 15:20  FileUpload\WebRoot\prototype.js

     文件       2531  2006-05-19 15:20  FileUpload\WebRoot\test.html

     文件       1192  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\classes\book\upload\MonitoredDiskFileItem.class

     文件       1317  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\classes\book\upload\MonitoredDiskFileItemFactory.class

     文件       1250  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\classes\book\upload\MonitoredOutputStream.class

     文件        237  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\classes\book\upload\OutputStreamListener.class

     文件       1457  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\classes\book\upload\UploadListener$FileUploadStats.class

     文件       1311  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\classes\book\upload\UploadListener.class

     文件       7413  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\classes\book\upload\UploadServlet.class

     文件      31825  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\lib\commons-fileupload-1.1.jar

     文件      65621  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\lib\commons-io-1.2.jar

     文件        568  2006-05-19 15:20  FileUpload\WebRoot\WEB-INF\web.xml

     目录          0  2009-04-07 16:27  FileUpload\WebRoot\WEB-INF\classes\book\upload

     目录          0  2009-04-07 16:27  FileUpload\WebRoot\WEB-INF\classes\book

     目录          0  2009-04-07 16:27  FileUpload\src\book\upload

     目录          0  2009-04-07 16:27  FileUpload\WebRoot\WEB-INF\classes

     目录          0  2009-04-07 16:27  FileUpload\WebRoot\WEB-INF\lib

............此处省略11个文件信息

评论

共有 条评论