From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]>
I am writing a Struts application which needs to read a database, fetch an
image inside a blob field and display it in a JSP page in two different
ways:
- Within a thumbnail size inside a column of a normal html <table>. Which
means the image needs to be resized for displaying purposes.
All images inside this table cannot exceed a maximum height and width in
order to have a neat display.
- And using the image original size.
When you put <img src="..."/> in an HTML page, the browser will make a
separate request to get the image. I would map that request to a plain old
Servlet-- there's no reason to tie this to the Struts framework.
I do this now for an image that's generated by JFreeChart, but the same
thing applies if you're going to retrieve binary data from a database and
write it out to the browser. Assuming you already know how to retrieve the
image from the database, ask Google about images and servlets:
http://www.google.com/search?q=java+image+servlet
I would get the full size image retrieval and display working first, then
think about how to do the thumbnails.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]