简体   繁体   English

Struts2:下载文件+ WaitAndExecute

[英]Struts2: Download File + WaitAndExecute

I have a little problem: 我有一个小问题:

I have a action configured with these params: 我有一个配置有以下参数的动作:

<action name="exportCSV" class="it.asd.ExportAction">
    <interceptor-ref name="defaultLoginStack" />
    <interceptor-ref name="execAndWait"/>
         <result name="success" type="stream">
             <param name="contentType">application/x-zip-compressed</param>
             <param name="inputName">fileStream</param>
             <param name="contentDisposition">attachment;filename="${filename}"</param>
             <param name="bufferSize">2048</param>
         </result>
         <result name="wait" type="tiles">waitPage</result>

      <result name="error" type="redirectAction" >visualizzaasd</result>
    </action>

I want that, after downloading, page returns to another and not remain on the waitpage. 我希望下载后,页面返回到另一个页面,而不保留在等待页面上。

Thanks! 谢谢!

You can not now when the file was downloaded. 现在无法下载文件。 You can add meta refresh to your wait page. 您可以将元刷新添加到等待页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM