Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

In Nature there are neither rewards nor punishments, there are consequences. -- R. G. Ingersoll


devel / comp.lang.java.programmer / How do I download a file with struts2 with a dialog?

SubjectAuthor
o How do I download a file with struts2 with a dialog?e.d.pro...@gmail.com

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

<853a5f7e-50b8-4e9f-a00f-57b50a5949ccn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=296&group=comp.lang.java.programmer#296

  copy link   Newsgroups: comp.lang.java.programmer
X-Received: by 2002:a05:620a:4c87:b0:76e:f294:a706 with SMTP id to7-20020a05620a4c8700b0076ef294a706mr166510qkn.2.1693581825945;
Fri, 01 Sep 2023 08:23:45 -0700 (PDT)
X-Received: by 2002:a05:6a00:3997:b0:68a:58e1:ebf5 with SMTP id
fi23-20020a056a00399700b0068a58e1ebf5mr1173584pfb.2.1693581825629; Fri, 01
Sep 2023 08:23:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.java.programmer
Date: Fri, 1 Sep 2023 08:23:44 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=98.237.40.232; posting-account=2czF5goAAAD4GBMPIGV4KcD2K4PhoB_H
NNTP-Posting-Host: 98.237.40.232
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <853a5f7e-50b8-4e9f-a00f-57b50a5949ccn@googlegroups.com>
Subject: How do I download a file with struts2 with a dialog?
From: e.d.programmer@gmail.com (e.d.pro...@gmail.com)
Injection-Date: Fri, 01 Sep 2023 15:23:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1719
 by: e.d.pro...@gmail.com - Fri, 1 Sep 2023 15:23 UTC

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?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor