Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #40008

How do I download a file with struts2 with a dialog?

Newsgroups comp.lang.java.programmer
Date 2023-09-01 08:23 -0700
Message-ID <853a5f7e-50b8-4e9f-a00f-57b50a5949ccn@googlegroups.com> (permalink)
Subject How do I download a file with struts2 with a dialog?
From "e.d.pro...@gmail.com" <e.d.programmer@gmail.com>

Show all headers | View raw


I've tried everything I can think of here. In my struts.xml file I have <result="success" type="stream"> specifying param for contentType, inputName, contentDisposition, contentLength, and bufferSize.
I'm downloading using struts, with a class extending ActionSupport, sending file contents from a method called getFileStream which returns InputStream. I've tried every value I can think of for these params and it's downloading files to my downloads folder.
If I display a PDF using iFrame, there's a download icon. If I click that, I get a "Save As" popup window. How do I get my download link to popup that window?

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

How do I download a file with struts2 with a dialog? "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2023-09-01 08:23 -0700

csiph-web