简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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