Mailing List
Subject: RE: Downloading file rendered in JSP
Thanks for that.
I actually just needed to implement the ServletResponseAware interface
to access the servlet response properly.
Trying to set those in the JSP (through a scriplet) didn't work, but
indeed doing it in the action is
ailto:[EMAIL PROTECTED]
Sent: 08 April 2008 14:25
To: Struts Users Mailing List
Subject: RE: Downloading file rendered in JSP
To set the download file name, in addition to the "text/csv" mime type
(which you already have set), write the following java code in your
Action or (if necessary)
IS
-Original Message-
From: David Loup [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 08, 2008 7:42 AM
To: user@struts.apache.org
Subject: Downloading file rendered in JSP
Hi,
I'm trying to make one of my pages downloadable as a CSV file.
Currently my XML is configured like this:
Hi,
I'm trying to make one of my pages downloadable as a CSV file.
Currently my XML is configured like this:
/pages/download.jsp
And /pages/download.jsp renders the list as a CSV.
I have changed the content type in the CSV:
<%@ page contentType="text/csv" %>
Mike Baroukh wrote:
You must use content-disposition header :
response.setHeader("Content-Disposition", "attachment;
filename=\""+myfilename+"\"");
You can also add a mime type with something like
String mimeType = getServletContext().getMimeType(myfilename);
response.setHeader("Content-Ty
On 11/3/06, Balwinder <[EMAIL PROTECTED]> wrote:
Hi All,
I am developing an application in struts in which I needed to download a
file from a server. When iam clicking on download button, file lose its
extension and it with the action ie .do and does not open with the
associated application.
On 11/3/06, Balwinder <[EMAIL PROTECTED]> wrote:
Hi All,
I am developing an application in struts in which I needed to download a
file from a server. When iam clicking on download button, file lose its
extension and it with the action ie .do and does not open with the
associated application.
A
You must use content-disposition header :
response.setHeader("Content-Disposition", "attachment;
filename=\""+myfilename+"\"");
You can also add a mime type with something like
String mimeType = getServletContext().getMimeType(myfilename);
response.setHeader("Content-Type",
mimeType==null?"
Hi All,
I am developing an application in struts in which I needed to download a
file from a server. When iam clicking on download button, file lose its
extension and it with the action ie .do and does not open with the
associated application.
Any help is highly appreciated.
Thanks in adva
Here is a good article related to the problem:
http://www.javaworld.com/javatips/jw-javatip94_p.html
Lee
On Tue, 23 Nov 2004 18:38:30 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
>
>
> Dakota Jack wrote:
>
> >Weber, you're the best. Thanks a million.
> >
> >Jack
> >
> >
>
> You're quite we
Dakota Jack wrote:
Weber, you're the best. Thanks a million.
Jack
You're quite welcome.
P.S. Would you like a gmail invite?
Why, thank you. But, I already have a gmail account. Unfortunately, my
main email address long has been posted all over the Web (I didn't know
any better), so wh
Weber, you're the best. Thanks a million.
Jack
P.S. Would you like a gmail invite?
On Tue, 23 Nov 2004 13:31:54 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
>
>
> Morales de Frías wrote:
>
> >Hi¡
> >
> >I already know that this problem have been resolved before, but i can't find
> >the
Morales de Frías wrote:
Hi¡
I already know that this problem have been resolved before, but i can't find
the solution searching in this post. (Or solutions founded don't help me).
I have an action that generates pdf files, and zip them. And i want to download
it... but i have two problems:
--> F
When you do this, Radu, how does the file show up in the client? Is
it downloaded to a directory the client user chooses or is it
displayed in the client browser? Thanks.
Jack
On Tue, 23 Nov 2004 20:24:59 +0200, Radu Badita <[EMAIL PROTECTED]> wrote:
> I have the same problem trying to do the
I have the same problem trying to do the same as Morales... To overcome
this, i've made a JSP (just because i was too lazy to write a Servlet
:) where I get the OutputStream from the response, set the content type
and content-disposintion:
response.setContentType("application/octet-stream");
What do you mean by "dialog"? Do you want to download this file to
display it? Or do you want to download it to keep? The return null
for the ActionForward is used to display resources and is called after
the response is committed. The call is part and parcel of the content
of the response.
Ja
Hi¡
I already know that this problem have been resolved before, but i can't find
the solution searching in this post. (Or solutions founded don't help me).
I have an action that generates pdf files, and zip them. And i want to download
it... but i have two problems:
--> File that appears in di
17 matches
Mail list logo