Re: download file

2009-06-17 Thread Nils-Helge Garli Hegvik
Take a look at Pawel and Dave's replies once again. Nils-H On Wed, Jun 17, 2009 at 8:55 AM, PEGASUS84 wrote: > > thanks, > now there is a problem in struts.xml: > Can not find a java.io.InputStream with the name [${contentType}] in the > invocation stack. Check the > > > -- > View this message in

Re: download file

2009-06-16 Thread PEGASUS84
thanks, now there is a problem in struts.xml: Can not find a java.io.InputStream with the name [${contentType}] in the invocation stack. Check the -- View this message in context: http://www.nabble.com/download-file-tp24050039p24067967.html Sent from the Struts - User mailing list archive a

Re: download file

2009-06-16 Thread Dave Newton
PEGASUS84 wrote: my action is this: public class FileDownload extends ActionSupport { InputStream inputStream; public void setInputStream(InputStream s){inputStream=s;} public InputStream getInputStream(){return inputStream;} public String execute(){ return "sendFi

Re: download file

2009-06-16 Thread Nils-Helge Garli Hegvik
And where does your input stream come from? On Tue, Jun 16, 2009 at 12:11 PM, PEGASUS84 wrote: > > my action  is this: > public class FileDownload extends ActionSupport { > >       InputStream inputStream; > > >   public void setInputStream(InputStream s){inputStream=s;} >   public InputStream get

Re: download file

2009-06-16 Thread PEGASUS84
my action is this: public class FileDownload extends ActionSupport { InputStream inputStream; public void setInputStream(InputStream s){inputStream=s;} public InputStream getInputStream(){return inputStream;} public String execute(){ return "sendFile"; } } and in

Re: download file

2009-06-16 Thread Nils-Helge Garli Hegvik
You can't expect someone else to write your code for you... What have you tried? What errors did you get? You have to at least provide some informatino for us to help you. Nils-H On Tue, Jun 16, 2009 at 11:54 AM, PEGASUS84 wrote: > > sorry, > i don't succeed > i haven't idea > -- > View this mes

Re: download file

2009-06-16 Thread PEGASUS84
sorry, i don't succeed i haven't idea -- View this message in context: http://www.nabble.com/download-file-tp24050039p24051122.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user

Re: download file

2009-06-16 Thread Paweł Wielgus
Nope, that's all i've got, but You can try to remove all that's unimportant. Best greetings, Paweł Wielgus. 2009/6/16 PEGASUS84 : > > > Right it's  really too much > because i've not many packages that you've used. > > is there a more simple code ? > -- > View this message in context: > http://

Re: download file

2009-06-16 Thread PEGASUS84
Right it's really too much because i've not many packages that you've used. is there a more simple code ? -- View this message in context: http://www.nabble.com/download-file-tp24050039p24050650.html Sent from the Struts - User mailing list archive at Nabble.com. ---

Re: download file

2009-06-16 Thread Paweł Wielgus
Hi, read this: http://struts.apache.org/2.0.6/docs/stream-result.html and this (note that it's to much as for a simple download but that's what i've got): package com.ppp.oko.struts.action.motion.file; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; imp

Re: Download file from server and save on client

2006-09-11 Thread Hassan Schroeder
On 9/11/06, Dave Kennedy <[EMAIL PROTECTED]> wrote: I need to download a file from a server to client computer using Struts. I've implemented StrutsFileDownload from the Struts Wiki, but this displays the contents of the file http://wiki.apache.org/struts/StrutsFileDownload The answer is in the

Re: Download file from server and save on client

2006-09-11 Thread Thomas Joseph
Hi Dave, Basically you have to set the content disposotion to "attachment" eg.. //setting the content type to an arbitrary one, so to make browsers //definitely download the file. Some browsers simply ignore download //instruction and display the content once they know its cont

Re: Download file from server and save on client

2006-09-11 Thread Martin Gainty
Mr Kennedy Did you get a chance to look at ServletOutputStreamWrapper class? http://struts.apache.org/2.x/struts2-core/apidocs/index.html Here is a q&d example that uses it http://rifers.org:8088/browse/~raw,r=3183/rifers/jhighlight/trunk/src/com/uwyn/jhighlight/servlet/HighlightFilter.java Any