You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard <ri...@gmail.com> on 2004/11/26 06:18:52 UTC
Sending Binary Files from Action
Hi Guys,
I have created an expiring download link ( sent to users ) throiugh
the use of tokens and actions. Now I have not the slightest idea how
am I going to send the file to the user inside my actions. Can I use
forwards over this? please help.
Thanks
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Sending Binary Files from Action
Posted by Wiebe de Jong <wi...@shaw.ca>.
Hey Richard,
Are you upgrading your Struts to 1.2.6 to make use of the DownloadAction, or
do you need something that works with your current Struts version?
Wiebe
-----Original Message-----
From: Richard [mailto:richards.list@gmail.com]
Sent: Friday, November 26, 2004 12:55 AM
To: Struts Users Mailing List
Subject: Re: Sending Binary Files from Action
Hi Niall,
Thank you very much. The thing is I have found a sample application
that uses the DownloadAction. Discussion is at
http://www.mail-archive.com/dev@struts.apache.org/msg04600.html while
the source codes are at http://www.omnytex.com/downloadapp.zip.
I think I have a working version now and will stick to it. Again thank
you very much.
Richard
On Fri, 26 Nov 2004 08:06:46 -0000, Niall Pemberton
<ni...@blueyonder.co.uk> wrote:
> Rather than answer you here, I've created a page on the wiki with
> examples...
>
> http://wiki.apache.org/struts/StrutsFileDownload
>
> I haven't actually used DownloadAction myself - but I am doing the same
sort
> of thing in my application.
>
>
>
>
> Niall
>
> ----- Original Message -----
> From: "Richard" <ri...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Friday, November 26, 2004 5:40 AM
> Subject: Re: Sending Binary Files from Action
>
> > Hi Niall,
> >
> > Forgive but im a newbie. I dont know how I can use this. Definitely I
> > will need to change my struts jar files. But do I extend this action
> > or use it statically. What method do I use?
> >
> > Thanks
> > Richard
> >
> >
> > On Fri, 26 Nov 2004 05:32:09 -0000, Niall Pemberton
> > <ni...@blueyonder.co.uk> wrote:
> > > Theres a new DownloadAction in Struts 1.2.6:
> > >
> > >
> http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
> > >
> > > Niall
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Richard" <ri...@gmail.com>
> > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > Sent: Friday, November 26, 2004 5:18 AM
> > > Subject: Sending Binary Files from Action
> > >
> > > > Hi Guys,
> > > >
> > > > I have created an expiring download link ( sent to users ) throiugh
> > > > the use of tokens and actions. Now I have not the slightest idea how
> > > > am I going to send the file to the user inside my actions. Can I use
> > > > forwards over this? please help.
> > > >
> > > > Thanks
> > > > Richard
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
>
>
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Sending Binary Files from Action
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Dam, should pay more attention to the lists :-(
Anyway, I've add a link to it on that new wiki page. Thanks for pointing it
out. Listen if you have it working and theres stuff you learn from doing
it - feel free to update the wiki page.
Niall
----- Original Message -----
From: "Richard" <ri...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Friday, November 26, 2004 8:54 AM
Subject: Re: Sending Binary Files from Action
> Hi Niall,
>
> Thank you very much. The thing is I have found a sample application
> that uses the DownloadAction. Discussion is at
> http://www.mail-archive.com/dev@struts.apache.org/msg04600.html while
> the source codes are at http://www.omnytex.com/downloadapp.zip.
>
> I think I have a working version now and will stick to it. Again thank
> you very much.
> Richard
>
>
> On Fri, 26 Nov 2004 08:06:46 -0000, Niall Pemberton
> <ni...@blueyonder.co.uk> wrote:
> > Rather than answer you here, I've created a page on the wiki with
> > examples...
> >
> > http://wiki.apache.org/struts/StrutsFileDownload
> >
> > I haven't actually used DownloadAction myself - but I am doing the same
sort
> > of thing in my application.
> >
> >
> >
> >
> > Niall
> >
> > ----- Original Message -----
> > From: "Richard" <ri...@gmail.com>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Friday, November 26, 2004 5:40 AM
> > Subject: Re: Sending Binary Files from Action
> >
> > > Hi Niall,
> > >
> > > Forgive but im a newbie. I dont know how I can use this. Definitely I
> > > will need to change my struts jar files. But do I extend this action
> > > or use it statically. What method do I use?
> > >
> > > Thanks
> > > Richard
> > >
> > >
> > > On Fri, 26 Nov 2004 05:32:09 -0000, Niall Pemberton
> > > <ni...@blueyonder.co.uk> wrote:
> > > > Theres a new DownloadAction in Struts 1.2.6:
> > > >
> > > >
> >
http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
> > > >
> > > > Niall
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Richard" <ri...@gmail.com>
> > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > Sent: Friday, November 26, 2004 5:18 AM
> > > > Subject: Sending Binary Files from Action
> > > >
> > > > > Hi Guys,
> > > > >
> > > > > I have created an expiring download link ( sent to users )
throiugh
> > > > > the use of tokens and actions. Now I have not the slightest idea
how
> > > > > am I going to send the file to the user inside my actions. Can I
use
> > > > > forwards over this? please help.
> > > > >
> > > > > Thanks
> > > > > Richard
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> >
> >
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Sending Binary Files from Action
Posted by Richard <ri...@gmail.com>.
Hi Niall,
Thank you very much. The thing is I have found a sample application
that uses the DownloadAction. Discussion is at
http://www.mail-archive.com/dev@struts.apache.org/msg04600.html while
the source codes are at http://www.omnytex.com/downloadapp.zip.
I think I have a working version now and will stick to it. Again thank
you very much.
Richard
On Fri, 26 Nov 2004 08:06:46 -0000, Niall Pemberton
<ni...@blueyonder.co.uk> wrote:
> Rather than answer you here, I've created a page on the wiki with
> examples...
>
> http://wiki.apache.org/struts/StrutsFileDownload
>
> I haven't actually used DownloadAction myself - but I am doing the same sort
> of thing in my application.
>
>
>
>
> Niall
>
> ----- Original Message -----
> From: "Richard" <ri...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Friday, November 26, 2004 5:40 AM
> Subject: Re: Sending Binary Files from Action
>
> > Hi Niall,
> >
> > Forgive but im a newbie. I dont know how I can use this. Definitely I
> > will need to change my struts jar files. But do I extend this action
> > or use it statically. What method do I use?
> >
> > Thanks
> > Richard
> >
> >
> > On Fri, 26 Nov 2004 05:32:09 -0000, Niall Pemberton
> > <ni...@blueyonder.co.uk> wrote:
> > > Theres a new DownloadAction in Struts 1.2.6:
> > >
> > >
> http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
> > >
> > > Niall
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Richard" <ri...@gmail.com>
> > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > Sent: Friday, November 26, 2004 5:18 AM
> > > Subject: Sending Binary Files from Action
> > >
> > > > Hi Guys,
> > > >
> > > > I have created an expiring download link ( sent to users ) throiugh
> > > > the use of tokens and actions. Now I have not the slightest idea how
> > > > am I going to send the file to the user inside my actions. Can I use
> > > > forwards over this? please help.
> > > >
> > > > Thanks
> > > > Richard
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
>
>
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Sending Binary Files from Action
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
OK I added something. to the wiki on Content Disposition, but yes thats how
it works.
Niall
----- Original Message -----
From: "Dakota Jack" <da...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Friday, November 26, 2004 8:29 AM
Subject: Re: Sending Binary Files from Action
> Hello, Niall,
>
> Nice addition. Let me suggest that you indicate how to apply the
> content-disposition header with filename. That is where my knowledge
> runs out at this time. The difference in the JSP page between inline
> and attachment is what has me puzzled. I could just try various
> options and see what happens, but I like to understand these things.
>
> Is the idea that where the header is inline the same browser page will
> display the file whereas with attachment the brownser will keep the
> same page and ask where you would like to store the downloaded file?
> Thanks.
>
> Jack
>
>
> On Fri, 26 Nov 2004 08:06:46 -0000, Niall Pemberton
> <ni...@blueyonder.co.uk> wrote:
> > Rather than answer you here, I've created a page on the wiki with
> > examples...
> >
> > http://wiki.apache.org/struts/StrutsFileDownload
> >
> > I haven't actually used DownloadAction myself - but I am doing the same
sort
> > of thing in my application.
> >
> >
> >
> >
> > Niall
> >
> > ----- Original Message -----
> > From: "Richard" <ri...@gmail.com>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Friday, November 26, 2004 5:40 AM
> > Subject: Re: Sending Binary Files from Action
> >
> > > Hi Niall,
> > >
> > > Forgive but im a newbie. I dont know how I can use this. Definitely I
> > > will need to change my struts jar files. But do I extend this action
> > > or use it statically. What method do I use?
> > >
> > > Thanks
> > > Richard
> > >
> > >
> > > On Fri, 26 Nov 2004 05:32:09 -0000, Niall Pemberton
> > > <ni...@blueyonder.co.uk> wrote:
> > > > Theres a new DownloadAction in Struts 1.2.6:
> > > >
> > > >
> >
http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
> > > >
> > > > Niall
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Richard" <ri...@gmail.com>
> > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > Sent: Friday, November 26, 2004 5:18 AM
> > > > Subject: Sending Binary Files from Action
> > > >
> > > > > Hi Guys,
> > > > >
> > > > > I have created an expiring download link ( sent to users )
throiugh
> > > > > the use of tokens and actions. Now I have not the slightest idea
how
> > > > > am I going to send the file to the user inside my actions. Can I
use
> > > > > forwards over this? please help.
> > > > >
> > > > > Thanks
> > > > > Richard
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
>
>
> "You can't wake a person who is pretending to be asleep."
>
> ~Native Proverb~
>
> "Each man is good in His sight. It is not necessary for eagles to be
crows."
>
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Sending Binary Files from Action
Posted by Dakota Jack <da...@gmail.com>.
Hello, Niall,
Nice addition. Let me suggest that you indicate how to apply the
content-disposition header with filename. That is where my knowledge
runs out at this time. The difference in the JSP page between inline
and attachment is what has me puzzled. I could just try various
options and see what happens, but I like to understand these things.
Is the idea that where the header is inline the same browser page will
display the file whereas with attachment the brownser will keep the
same page and ask where you would like to store the downloaded file?
Thanks.
Jack
On Fri, 26 Nov 2004 08:06:46 -0000, Niall Pemberton
<ni...@blueyonder.co.uk> wrote:
> Rather than answer you here, I've created a page on the wiki with
> examples...
>
> http://wiki.apache.org/struts/StrutsFileDownload
>
> I haven't actually used DownloadAction myself - but I am doing the same sort
> of thing in my application.
>
>
>
>
> Niall
>
> ----- Original Message -----
> From: "Richard" <ri...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Friday, November 26, 2004 5:40 AM
> Subject: Re: Sending Binary Files from Action
>
> > Hi Niall,
> >
> > Forgive but im a newbie. I dont know how I can use this. Definitely I
> > will need to change my struts jar files. But do I extend this action
> > or use it statically. What method do I use?
> >
> > Thanks
> > Richard
> >
> >
> > On Fri, 26 Nov 2004 05:32:09 -0000, Niall Pemberton
> > <ni...@blueyonder.co.uk> wrote:
> > > Theres a new DownloadAction in Struts 1.2.6:
> > >
> > >
> http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
> > >
> > > Niall
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Richard" <ri...@gmail.com>
> > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > Sent: Friday, November 26, 2004 5:18 AM
> > > Subject: Sending Binary Files from Action
> > >
> > > > Hi Guys,
> > > >
> > > > I have created an expiring download link ( sent to users ) throiugh
> > > > the use of tokens and actions. Now I have not the slightest idea how
> > > > am I going to send the file to the user inside my actions. Can I use
> > > > forwards over this? please help.
> > > >
> > > > Thanks
> > > > Richard
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Sending Binary Files from Action
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Rather than answer you here, I've created a page on the wiki with
examples...
http://wiki.apache.org/struts/StrutsFileDownload
I haven't actually used DownloadAction myself - but I am doing the same sort
of thing in my application.
Niall
----- Original Message -----
From: "Richard" <ri...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Friday, November 26, 2004 5:40 AM
Subject: Re: Sending Binary Files from Action
> Hi Niall,
>
> Forgive but im a newbie. I dont know how I can use this. Definitely I
> will need to change my struts jar files. But do I extend this action
> or use it statically. What method do I use?
>
> Thanks
> Richard
>
>
> On Fri, 26 Nov 2004 05:32:09 -0000, Niall Pemberton
> <ni...@blueyonder.co.uk> wrote:
> > Theres a new DownloadAction in Struts 1.2.6:
> >
> >
http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
> >
> > Niall
> >
> >
> >
> > ----- Original Message -----
> > From: "Richard" <ri...@gmail.com>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Friday, November 26, 2004 5:18 AM
> > Subject: Sending Binary Files from Action
> >
> > > Hi Guys,
> > >
> > > I have created an expiring download link ( sent to users ) throiugh
> > > the use of tokens and actions. Now I have not the slightest idea how
> > > am I going to send the file to the user inside my actions. Can I use
> > > forwards over this? please help.
> > >
> > > Thanks
> > > Richard
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Sending Binary Files from Action
Posted by Richard <ri...@gmail.com>.
Hi Niall,
Forgive but im a newbie. I dont know how I can use this. Definitely I
will need to change my struts jar files. But do I extend this action
or use it statically. What method do I use?
Thanks
Richard
On Fri, 26 Nov 2004 05:32:09 -0000, Niall Pemberton
<ni...@blueyonder.co.uk> wrote:
> Theres a new DownloadAction in Struts 1.2.6:
>
> http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
>
> Niall
>
>
>
> ----- Original Message -----
> From: "Richard" <ri...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Friday, November 26, 2004 5:18 AM
> Subject: Sending Binary Files from Action
>
> > Hi Guys,
> >
> > I have created an expiring download link ( sent to users ) throiugh
> > the use of tokens and actions. Now I have not the slightest idea how
> > am I going to send the file to the user inside my actions. Can I use
> > forwards over this? please help.
> >
> > Thanks
> > Richard
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Sending Binary Files from Action
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Theres a new DownloadAction in Struts 1.2.6:
http://struts.apache.org/api/org/apache/struts/actions/DownloadAction.html
Niall
----- Original Message -----
From: "Richard" <ri...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Friday, November 26, 2004 5:18 AM
Subject: Sending Binary Files from Action
> Hi Guys,
>
> I have created an expiring download link ( sent to users ) throiugh
> the use of tokens and actions. Now I have not the slightest idea how
> am I going to send the file to the user inside my actions. Can I use
> forwards over this? please help.
>
> Thanks
> Richard
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org