cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beyaNet Consultancy <beya...@ntlworld.com>
Subject Re: reading binary stream into xsp page
Date Thu, 12 Feb 2004 09:22:29 GMT
Eduard,
I tried your recommendation and it worked partly but the output to the 
screen is incorrect. I am getting &#0;t&#0;h&#0;i&#0;s&#0; written to

the screen instead of plain text with out the &#0; being written to the 
screen as well. How do I deal with this? And if the output stream was 
an image or audio how would I deal with those outputs as well? for 
instance if:

1. byte[] text = newArt.getArtistPhoto1(); allows me to do 
<xsp:expr>new String(text)</xsp:expr> in my xsp page, how would I deal 
with:

2. byte[] image = newArt.getArtistPhoto1(); or

3. byte[] audio = newArt.getArtistPhoto1();

many thanks in advance
On 12 Feb 2004, at 06:37, Eduard Drenth wrote:

> On Thu, 2004-02-12 at 01:48, beyaNet Consultancy wrote:
>> Hi,
>> I have the following code in my xsp page:
>>
>> byte[] binImg = newArt.getArtistPhoto1();
>>
>> I now want to display this stream in the page like so:
>>
>> <xsp:expr>binImg</xsp:expr>
>>
>
> If this is a textfile try: <xsp:expr>new String(binImg)</xsp:expr>
>
>> but am getting, as expected, casting errors. What do i need to do
>> todisplay the contents of this stream, which was a simple txt file
>> readinto postgresql as a byte array? Any help with this issue will be
>> mostappreciated.
>>
>>
>> many thanks in advance
> -- 
> Eduard Drenth <eduarddrenth@tiscali.nl>
> home sweet home
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

Mime
View raw message