You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Alan Chiang <al...@gmail.com> on 2005/01/14 23:31:48 UTC

Returning binary data through portlet

Hi all,
  Wondering if anyone knows how to get a portlet to return binary
data, or get Jetspeed to return binary data.  I have a JSP that reads
files for download, coupled with the JSP portlet, but any data
returned seems to be intercepted and interpreted as text and is dumped
to the portlet window.

  All the response headers have been correctly set and this JSP works
outside of the portlet;
so either the response headers are being swallowed, or the data is
being converted.  Any quick and dirty way to get files to download
through portlets?

Thanks
-- 
"Calling Canadian beef unsafe is like calling your twin sister ugly"
~ Mark Dopp

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


Re: Returning binary data through portlet

Posted by David Sean Taylor <da...@bluesunrise.com>.
Dan Moore wrote:
> Hi Alan,
> 
> I can't imagine that you can actually do this, because once the portal
> begins rendering text (which would happen before your portlet was
> rendered), you can't change it to render binary data.
> 
> Any chance you can have a link to a servlet with a target of _blank
> which pops up in a new window and sends the binary data?  (I outlined
> how I did this in a slightly different circumstance here:
> http://www.mooreds.com/weblog/archives/000018.html)  Or, you could just
> link to that JSP.
> 
> Dan
> 
> --- Alan Chiang <al...@gmail.com> wrote:
> 
> 
>>Hi all,
>>  Wondering if anyone knows how to get a portlet to return binary
>>data, or get Jetspeed to return binary data.  I have a JSP that reads
>>files for download, coupled with the JSP portlet, but any data
>>returned seems to be intercepted and interpreted as text and is
>>dumped
>>to the portlet window.
>>

Recommend using the portlet pipeline

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

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


Re: Returning binary data through portlet

Posted by Dan Moore <mo...@yahoo.com>.
Hi Alan,

I can't imagine that you can actually do this, because once the portal
begins rendering text (which would happen before your portlet was
rendered), you can't change it to render binary data.

Any chance you can have a link to a servlet with a target of _blank
which pops up in a new window and sends the binary data?  (I outlined
how I did this in a slightly different circumstance here:
http://www.mooreds.com/weblog/archives/000018.html)  Or, you could just
link to that JSP.

Dan

--- Alan Chiang <al...@gmail.com> wrote:

> Hi all,
>   Wondering if anyone knows how to get a portlet to return binary
> data, or get Jetspeed to return binary data.  I have a JSP that reads
> files for download, coupled with the JSP portlet, but any data
> returned seems to be intercepted and interpreted as text and is
> dumped
> to the portlet window.
> 
>   All the response headers have been correctly set and this JSP works
> outside of the portlet;
> so either the response headers are being swallowed, or the data is
> being converted.  Any quick and dirty way to get files to download
> through portlets?
> 
> Thanks
> -- 
> "Calling Canadian beef unsafe is like calling your twin sister ugly"
> ~ Mark Dopp
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jetspeed-user-help@jakarta.apache.org
> 
> 


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