You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Mark Nutter <ja...@linklore.org> on 2002/04/18 15:18:33 UTC

Re: #2 .getOutputStream() missing, it's driving me crazy ! another problem!!!!!!!

Try this:  instead of setting a "filename" header, set your
Content-Dispostion header as follows:

  resp.setHeader("Content-Disposition", "inline; filename=\"" +
_attach.getFilename() + "\"");

Mark Nutter
javadev@linklore.org
My horoscope says today is a bad day to be superstitious.

On Thu, 2002-04-18 at 06:40, Fabio Daprile wrote:
> Hello,
> 
> I've another little problem regarding download.
> I use a RawScreen (Download.vm) and my files are stored in a MySql DB, 
> in a BLOB field.
> It does work when you only display the file, the problem raises when you 
> try to save this file.
> 
> hereafter how i call that page:
>             <a 
> href="$link.setPage("Download.vm").addQueryData("attachid", 
> "$Attachment.getId()")">$Attachment.getFilename()</A>
> 
> and here how is et the headers:
> 
>             resp.setContentType(_attach.getContenttype());
>             resp.setContentLength(_attach.getContent().length);
>             resp.setHeader("Content-Disposition", "attachment");
>             resp.setHeader("filename", _attach.getFilename());
> 
> The name of the file becomes "Download", the realname is lost.
> 
> How is it possible to keep the name of the file.
> 





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: #2 .getOutputStream() missing, it's driving me crazy ! another problem!!!!!!!

Posted by Fabio Daprile <fa...@wuerth.it>.
hello Mark,

i've tried but the problem remains the same.

thank's anyway.

bye

Mark Nutter wrote:

>Try this:  instead of setting a "filename" header, set your
>Content-Dispostion header as follows:
>
>  resp.setHeader("Content-Disposition", "inline; filename=\"" +
>_attach.getFilename() + "\"");
>
>Mark Nutter
>javadev@linklore.org
>My horoscope says today is a bad day to be superstitious.
>
>On Thu, 2002-04-18 at 06:40, Fabio Daprile wrote:
>
>>Hello,
>>
>>I've another little problem regarding download.
>>I use a RawScreen (Download.vm) and my files are stored in a MySql DB, 
>>in a BLOB field.
>>It does work when you only display the file, the problem raises when you 
>>try to save this file.
>>
>>hereafter how i call that page:
>>            <a 
>>href="$link.setPage("Download.vm").addQueryData("attachid", 
>>"$Attachment.getId()")">$Attachment.getFilename()</A>
>>
>>and here how is et the headers:
>>
>>            resp.setContentType(_attach.getContenttype());
>>            resp.setContentLength(_attach.getContent().length);
>>            resp.setHeader("Content-Disposition", "attachment");
>>            resp.setHeader("filename", _attach.getFilename());
>>
>>The name of the file becomes "Download", the realname is lost.
>>
>>How is it possible to keep the name of the file.
>>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>

-- 

-- 
Fabio Daprile

Würth-Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111 - (direct 564070)
Fax: +39 0471/564122

mailto:fabio.daprile@wuerth-phoenix.com
http://www.wuerth-phoenix.com
http://www.wuerth.com