欢迎来到天天文库
浏览记录
ID:9793057
大小:125.36 KB
页数:7页
时间:2018-05-09
《jsp实现文件上传以及类似百度文库在线阅读》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Jsp实现类似百度文库的在线阅读1.首先下载FlashPaper2并安装。如果你的系统是win7的话还需要下载一个补丁安装。关于FlashPaper2的操作请参考下面的网址。http://wenku.baidu.com/view/7575c9114431b90d6c85c775.html2.配置struts2的环境.将下面的架包拷贝到项目中。3.编写上传文件界面。代码如下:<%@pagelanguage="java"contentType="text/html;charset=utf-8"pageEncoding="utf-8"%><%@taglibpref
2、ix="s"uri="/struts-tags"%>
3、:">4.编写上后后跳转的页面。<%@pagelanguage="java"contentType="text/html;charset=utf-8"pageEncoding="utf-8"%><%@taglibprefix="s"uri="/struts-tags"%>4、LPUBLIC"-//W3C//DTDHTML4.01Transitional//EN">suc.swf"/>5、"/>1.编写Action类。packagezzuli.bysj.wh.action;importjava.io.BufferedInputStream;importjava.io.BufferedOutputStream;importjava.io.File;importjava.io.FileInputStream;importjava.io.FileOutputStream;importjava.io.InputStream;importjava.io.OutputStream;importjava.uti6、l.Date;importzzuli.bysj.wh.comm.util.FlashPaper;importcom.opensymphony.xwork2.ActionSupport;publicclassFileUploadActionextendsActionSupport{privatestaticfinallongserialVersionUID=572146812454l;privatestaticfinalintBUFFER_SIZE=15728640;privateFilefile;privateStringfileContentType;pr7、ivateStringfileFileName;privatebooleanflag;publicbooleanisFlag(){returnflag;}publicvoidsetFlag(booleanflag){this.flag=flag;}publicStringgetFileFileName(){returnfileFileName;}publicvoidsetFileFileName(StringfileFileName){this.fileFileName=fileFileName;}privateStringimageFileName;pri8、vateStringname;publicFileg
4、LPUBLIC"-//W3C//DTDHTML4.01Transitional//EN">
5、"/>1.编写Action类。packagezzuli.bysj.wh.action;importjava.io.BufferedInputStream;importjava.io.BufferedOutputStream;importjava.io.File;importjava.io.FileInputStream;importjava.io.FileOutputStream;importjava.io.InputStream;importjava.io.OutputStream;importjava.uti
6、l.Date;importzzuli.bysj.wh.comm.util.FlashPaper;importcom.opensymphony.xwork2.ActionSupport;publicclassFileUploadActionextendsActionSupport{privatestaticfinallongserialVersionUID=572146812454l;privatestaticfinalintBUFFER_SIZE=15728640;privateFilefile;privateStringfileContentType;pr
7、ivateStringfileFileName;privatebooleanflag;publicbooleanisFlag(){returnflag;}publicvoidsetFlag(booleanflag){this.flag=flag;}publicStringgetFileFileName(){returnfileFileName;}publicvoidsetFileFileName(StringfileFileName){this.fileFileName=fileFileName;}privateStringimageFileName;pri
8、vateStringname;publicFileg
此文档下载收益归作者所有