V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
zhaoritian19
V2EX  ›  问与答

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

  •  
  •   zhaoritian19 · 2019-12-16 11:33:46 +08:00 · 1002 次点击
    这是一个创建于 1585 天前的主题,其中的信息可能已经有所发展或是发生改变。

    各位大佬们,使用 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>
    
    5 条回复    2019-12-16 13:56:36 +08:00
    wysnylc
        1
    wysnylc  
       2019-12-16 12:11:34 +08:00
    我穿越了
    zhaoritian19
        2
    zhaoritian19  
    OP
       2019-12-16 13:07:16 +08:00
    @wysnylc 怎么了……
    ihciah
        3
    ihciah  
       2019-12-16 13:08:49 +08:00 via iPhone
    多不怕死用 struts2🤣
    zhaoritian19
        4
    zhaoritian19  
    OP
       2019-12-16 13:28:15 +08:00
    @ihciah 没办法啊 接手的旧的项目
    wc951
        5
    wc951  
       2019-12-16 13:56:36 +08:00 via Android
    struts2 爆了那么多漏洞还有人在用吗
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5460 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 03:30 · PVG 11:30 · LAX 20:30 · JFK 23:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.