資源簡介
JSP大學實用教程程序源代碼.doc
第3章 JSP標記.ppt第6章 JSP中的文件操作.ppt第9章 基于Servlet的MVC模式.ppt………………
代碼片段和文件信息
package?tom.jiafei;
import?java.io.*;
import?javax.servlet.http.*;
public?class?DownLoadFile{
????HttpServletResponse?response;
????String?fileName;
????public?void?setResponse(HttpServletResponse?response)?{
???????this.response=response;
????}?
???public?String?getFileName(){
???????return?fileName;
????}
????public?void?setFileName(String?s){
???????fileName=s;
????????File?fileLoad=new?File(“f:/2000“fileName);
???????//客戶使用下載文件的對話框:
???????response.setHeader(“Content-disposition““attachment;filename=“+fileName);?
???????try{
?????????????FileInputStream?in=new?FileInputStream(fileLoad);
???? ?????OutputStream?out=response.getOutputStream();
?????????????byte[]?buffer=new?byte[1024];
?????int?n?=?-1;
?????????????while?((n=in.read(buffer))!=?-1)?
??????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????I.A....???????936??2008-10-08?15:02??JSP大學實用教程[耿祥義等編著][程序源代碼]\DownLoadFile.java
????I.A....???1346560??2008-09-16?00:27??JSP大學實用教程[耿祥義等編著][程序源代碼]\JSP大學實用教程程序源代碼.doc
????I.A....????114176??2007-05-29?15:39??JSP大學實用教程[耿祥義等編著][電子教案]\第1章?JSP簡介.ppt
????I.A....?????93696??2007-05-29?15:39??JSP大學實用教程[耿祥義等編著][電子教案]\第2章?JSP頁面.ppt
????I.A....????128000??2007-05-29?15:39??JSP大學實用教程[耿祥義等編著][電子教案]\第3章?JSP標記.ppt
????I.A....????130048??2007-05-29?15:42??JSP大學實用教程[耿祥義等編著][電子教案]\第4章?內置對象.ppt
????I.A....?????99328??2007-05-29?15:42??JSP大學實用教程[耿祥義等編著][電子教案]\第5章?JSP與JavaBean.ppt
????I.A....????123904??2007-05-29?15:43??JSP大學實用教程[耿祥義等編著][電子教案]\第6章?JSP中的文件操作.ppt
????I.A....????117760??2007-05-29?15:43??JSP大學實用教程[耿祥義等編著][電子教案]\第7章?在JSP中使用數據庫.ppt
????I.A....????116224??2007-05-29?15:43??JSP大學實用教程[耿祥義等編著][電子教案]\第8章?Java?Servlet基礎.ppt
????I.A....????109568??2007-05-29?15:43??JSP大學實用教程[耿祥義等編著][電子教案]\第9章?基于Servlet的MVC模式.ppt
????I..D...?????????0??2009-09-10?20:44??JSP大學實用教程[耿祥義等編著][程序源代碼]
????I..D...?????????0??2009-09-10?20:45??JSP大學實用教程[耿祥義等編著][電子教案]
-----------?---------??----------?-----??----
??????????????2380200????????????????????13
評論
共有 條評論