求教,关于 struts2 文件上传重复上传的问题 i

2019-12-16 11:33:46 +08:00
 zhaoritian19

各位大佬们,使用 struts2 上传文件,由于文件量过大,代码处理超过 5 分钟后会为什么会重新执行一次文件上传,请问这种情况怎么避免?是哪里的配置问题吗? 这里是我的 struts2 配置:

<action name="realFlyTimeAdjustUpload_*" method="{1}" 			class="com.ceair.retrospect.dealcount.jlcount.action.RealFlyTimeAdjustUploadAction">

       <!-- 配置名字为 fileUpload 的拦截器 -->
      <interceptor-ref name="fileUpload">
        <!-- 配置允许上传的文件类型 xls,xlsx -->
         <param name="allowedTypes">application/excel,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/octet-stream</param>
        <!-- 配置允许上传文件的大小(单位字节) -->
      </interceptor-ref>
      <interceptor-ref name="defaultStack"></interceptor-ref>
            <!-- 动态设置保存文件的路径 (Action 的属性值)-->
      <param name="savePath">/file/fileUpload/flightTime</param>
       <result name="uploadRealFlyTimeAdjust" type="freemarker">WEB-INF/content/jlcount/importRealFlyTimeAdjust.ftl</result>
       <result name="result" type="json">
            <!-- IE 下导入完成 json 需以 text/heml 格式返回 否则一直要保存文件 -->

            <param name="contentType">text/html</param>
            <param name="root">resultMap</param>
       </result>
   </action>
1008 次点击
所在节点    问与答
5 条回复
wysnylc
2019-12-16 12:11:34 +08:00
我穿越了
zhaoritian19
2019-12-16 13:07:16 +08:00
@wysnylc 怎么了……
ihciah
2019-12-16 13:08:49 +08:00
多不怕死用 struts2🤣
zhaoritian19
2019-12-16 13:28:15 +08:00
@ihciah 没办法啊 接手的旧的项目
wc951
2019-12-16 13:56:36 +08:00
struts2 爆了那么多漏洞还有人在用吗

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/629410

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX