you have not understood what I am doing. I am reading a byte[] field from postgreSQL into my xsp page:
Artist newArt = new Artist(); byte[] binStream = newArt.getArtistPhoto1();
What I simply want to know is this, how do I render the binary stream correctly to the page if:
1. binStream is an image or 2. binStream is a text document
what do I need to do in xsp to correctly display the binary stream as an image or as text?
many thanks in advance
On 12 Feb 2004, at 10:10, Leszek Gawron wrote:
On Thu, Feb 12, 2004 at 09:22:29AM +0000, beyaNet Consultancy wrote:Eduard,you got it all wrong right now. If you (a user working with the browser)
I tried your recommendation and it worked partly but the output to the
screen is incorrect. I am getting �t�h�i�s� written to
the screen instead of plain text with out the � 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();
request a page that contains both text and graphics then this content is
requested separately. So it means that first the html code gets fetched. After
that every <img> tag is being parsed and fetched in separate request. When the
browser has all the files needed it renders the page.
You do not need to include any binary data in your html code produced by xsp.
And the � ? If you try to insert binary content into xml it gets escaped
(everything that is not "text" ).
lg -- __ | / \ | Leszek Gawron // \\ \_\\ //_/ [EMAIL PROTECTED] _\\()//_ .'/()\'. Phone: +48(501)720812 / // \\ \ \\ // recursive: adj; see recursive | \__/ |
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
