Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads WEB Code JSP/Java

struts2_fileUpload

  • Category : JSP/Java
  • Tags :
  • Update : 2013-08-13
  • Size : 71kb
  • Downloaded :0次
  • Author :说***
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Download1 Download2
Don't use download software fo downloading.
If download fail,Try it again for free.
Introduction - If you have any usage issues, please Google them yourself
a.上传功能 需要使用Struts内置的fileUpload拦截器完成。 ---fileUpload拦截器原理 首先调用指定的上传组件(commons-fileupload.jar)将请求提交的文件解析出来。解析出文件将其放置到一个临时目录下(tomcat/work)。将临时文件对象给Action的属性赋值。 之后执行invoke()方法调用Action的execute处理。 调用Action和Result之后,拦截器将临时文件删除。 注意:由于defaultStack包含fileUpload因此没有特殊需求可以不用引用。 操作需要注意的问题: ---JSP表单中method和enctype属性值 <input type="file" name="xxx"/> ---Action属性定义 File xxx String xxxFileName String xxxContentType ----jar包引用 commons-fileupload依赖commons-io.jar b.下载功能 需要使用Struts提供的stream类型的Result组件。
Packet file list
(Preview for download)


struts2day05
............\.classpath
............\.myeclipse
............\.mymetadata
............\.project
............\.settings
............\.........\com.genuitec.eclipse.j2eedt.core.prefs
............\day05.txt
............\src
............\...\struts.xml
............\...\tarena
............\...\......\action
............\...\......\......\DownLoadAction.java
............\...\......\......\Favor.java
............\...\......\......\FavorDAO.java
............\...\......\......\FileUtil.java
............\...\......\......\FormAction.java
............\...\......\......\UploadAction.java
............\...\......\......\UserAction.java
............\...\......\interceptor
............\...\......\...........\LoggerInterceptor.java
............\WebRoot
............\.......\form.jsp
............\.......\index.jsp
............\.......\js
............\.......\..\jquery-1.4.3.js
............\.......\META-INF
............\.......\........\MANIFEST.MF
............\.......\ok.jsp
............\.......\upload
............\.......\upload.jsp
............\.......\WEB-INF
............\.......\.......\classes
............\.......\.......\.......\struts.xml
............\.......\.......\.......\tarena
............\.......\.......\.......\......\action
............\.......\.......\.......\......\......\DownLoadAction.class
............\.......\.......\.......\......\......\Favor.class
............\.......\.......\.......\......\......\FavorDAO.class
............\.......\.......\.......\......\......\FileUtil.class
............\.......\.......\.......\......\......\FormAction.class
............\.......\.......\.......\......\......\UploadAction.class
............\.......\.......\.......\......\......\UserAction.class
............\.......\.......\.......\......\interceptor
............\.......\.......\.......\......\...........\LoggerInterceptor.class
............\.......\.......\lib
............\.......\.......\web.xml
Related instructions
  • We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
  • The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
  • Please use Winrar for decompression tools
  • If download fail, Try it againg or Feedback to us.
  • If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
  • Before downloading, you can inquire through the uploaded person information

Nothing.

Post Comment
*Quick comment Recommend Not bad Password Unclear description Not source
Lost files Unable to decompress Bad
*Content :
*Captcha :
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.