You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Yee <ry...@cruzio.com> on 2002/12/01 19:01:22 UTC

Re: Tag for displaying images pre-loaded in Javabeans as byte[].

Frederic,
If I understand you correctly, I do not think that you can do what you are 
asking. An HTML img tag has a src attribute that needs to refer to a 
resource on the web somewhere. There is no way to physically embed binary 
data into an html page. Instead, you should have the src attribute of your 
tag refer to a servlet that can return the image directly from the database 
or possibly from your JavaBean. You would need to use a query string to 
identify the particular image you want to display.

Regards,

Richard

At 07:49 PM 12/1/2002 +0200, you wrote:
>Hi,
>
>I'm searching for a tag that displays an image (gif or jpeg format)
>pre-loaded in a JavaBean as an array of bytes.
>
>My HTML page is a HTML table and each cell is composed of a thumbnail and
>several other HTML componenets.
>My thumbnails are retrieved from the database and stored in a Javabean as:
>private byte[] blobData;
>All the examples I found of image tags included links to files.
>
>Your help will be appreciated.
>Frederic
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>



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