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


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

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

Started by"e.d.pro...@gmail.com" <e.d.programmer@gmail.com>
First post2023-09-01 08:23 -0700
Last post2023-09-01 08:23 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.programmer


Contents

  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

#40008 — How do I download a file with struts2 with a dialog?

From"e.d.pro...@gmail.com" <e.d.programmer@gmail.com>
Date2023-09-01 08:23 -0700
SubjectHow do I download a file with struts2 with a dialog?
Message-ID<853a5f7e-50b8-4e9f-a00f-57b50a5949ccn@googlegroups.com>
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?

[toc] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web