冲上云霄

zhaosoft

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  35 随笔 :: 0 文章 :: 6 评论 :: 0 Trackbacks
导读:   自然而然的想法就是在 Action 中声明变量 File upload 和 String desc,请求提交到这个 Action 后,在 execute() 方法中就能直接使用 upload 和 desc 了,它们已被 Struts2 框架(org.apache.struts2.interceptor.FileUploadInterceptor监听器) 赋上了相应的值了。   因为维护的是一个古老的项目,请求都是直接提交给 jsp。在这个项目中套上了 Struts2 已是不易了。原来项目是用的 jspSmartUpload 来处理上传文件的,Struts2 一上 jspSmartUpload 便不能正常工作了,因为 Struts2 的过滤器 org.apache.struts2.dispatcher.FilterDispatcher拦截的是所有的请求,在交把请求交给 jspSmartUpload 之前请求 request 就已被处理过了,即使是把 struts2-core-2.x.x.jar 中的 struts-default.xmlfileUpload 取消了也是
文章来源:http://blog.csdn.net/zxl315/archive/2008/06/17/2558591.aspx
posted on 2008-11-25 15:39 zhaosoft 阅读(124) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: