Does anyone know how to fill InputStream from a list of String lines ? I need
to fill it from database and show file for download. Is this O.K.:

InputStream is = new ByteArrayInputStream("string".getBytes("UTF-8"));

My file should be about 5Mb, I hope that it is not so big to be stored in
mem. ?

--
M.


Milan Milanovic wrote:
> 
> Dear Dave,
> 
> I found the problem, my submit button was = ajax type, so I switched it to
> simple. 
> 
> Regarding Stream Result, it is not clear to me, this result needs
> InputStream for inputName,
> but shouldnt' it be a OutputStream ? I need to fill the stream, e.g. from
> my database and to
> flush it to the result, isn't it ? I cannot fill InputStream.
> 
> --
> Thanks, Milan
> 
> 
> newton.dave wrote:
>> 
>> You said it was an issue if you had an s:file tag. Since you don't need
>> an s:file tag, it shouldn't be an issue.
>> 
>> If you still think it's an issue post the code and configs--I upload
>> files all the time without any difficulties, so it's probably something
>> straight-forward.
>> 
>> Dave
>> 
>> --- On Mon, 12/22/08, Milan Milanovic <milanmilanov...@yahoo.com> wrote:
>> 
>> From: Milan Milanovic <milanmilanov...@yahoo.com>
>> Subject: Re: [S2] Using <s:file/> tag for choosing file (no uploading)
>> To: user@struts.apache.org
>> Date: Monday, December 22, 2008, 5:56 PM
>> 
>> 
>> Dear Dave,
>> 
>> 
>> newton.dave wrote:
>>> 
>>>> btw - do you maybe know why when file tag is in the <s:form/> tag, 
>>>> form action doesn't redirect ?
>>> 
>>> Not without further information. I have no issues uploading files. Since
>>> you're not uploading a file, this shouldn't be an issue for you anyway.
>>> 
>>> 
>> 
>> Well, it is an issue, because when user submit the button on the form I
>> cannot redirect to to some other page, and it remain on that page where
>> he
>> called submit button. An action is executed, but action result not.
>> 
>> --
>> Best regards, M.
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/-S2--Using-%3Cs%3Afile-%3E-tag-for-choosing-file-%28no-uploading%29-tp21125988p21136574.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Using-%3Cs%3Afile-%3E-tag-for-choosing-file-%28no-uploading%29-tp21125988p21150748.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to