portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny" <danny.g...@mms-dresden.de>
Subject AW: J1: serving binary files through a portlet?
Date Thu, 01 Apr 2004 14:18:48 GMT
Which version of Jetspeed do you use?

I wrote a DownloadAction myself only 1 day ago. Even though I experienced
the troubles you described some time ago, when I wanted to do the same.
After having a look at the code, I realized a comment in RunDataFactory (or
RunData class) which indicated, that this problem is fixed.

I used version 1.4b4 and it works.

Danny

> -----Urspr√ľngliche Nachricht-----
> Von: Sami Leino [mailto:sami.leino@netorek.fi]
> Gesendet: Donnerstag, 1. April 2004 16:09
> An: jetspeed-dev@jakarta.apache.org
> Betreff: J1: serving binary files through a portlet?
>
>
> I am building a small bulletin-board system which should support
> attachments as well. For that, I would need to serve binary
> content from a
> PortletAction or Portlet class. Is this possible with J1?
>
> The procedure I should do is:
>
> 1) Set "content-disposition" header to contain the correct filename
> 2) Set "content-type" header to "application/octet-stream" or
> something
> more accurate if the information is present in attachment metadata
> 3) Dump the content using a ServletOutputStream
>
> I tried to do this within a PortletAction class, but Jetspeed
> has already
> obtained a Writer prior to calling the PortletAction and therefore I
> cannot obtain ServletOutputStream from HttpServletResponse.
> As you know,
> Writer shouldn't be used for binary data because it may perform some
> character encoding on the content, and it might break the attachments.
>
> Do I need to create a separate servlet for serving the attachments? I
> wouldn't want to do that, because Jetspeed offers authorization and I
> would really like to fully utilize it.
>
> Regards,
>
> Sami
>
> --
>
> Sami Leino
> Software Developer
> Netorek Oy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message