David, You brought up a good point that I didn't even think of. Since the text is written out to response using a PrintWriter I would have to use some type of stream output for the images.
I created another servlet just to try and display the images. I got as far as retrieving them from the database in a DatabaseImage class and them returning them to a new servlet to display them. I get an sql error in the DatabaseImage class when I get to the return statement that says I need to be connected to the server(whatever that means). Anyway, thanks for your help. I will keep the list posted as to my progress. Calvin David Smith wrote the following on 5/17/2006 2:56 PM: > Images are separate resources from the HTML their <img..../> tag is > spec'd in. I'd say write your table out with the <img ... /> tag > specifying a URL to an image serving servlet. Then put together a > simple servlet that will handle those requests and stream the > appropriate data to the client. > > An example: <img src="/webapp/path/to/servlet.jpg?recId=3432234"/> > > The servlet mapped to /path/to/servlet.jpg would use the id to retrieve > the binary data and just stream it straight to the client via the response. > > --David > > Calvin Deiterich wrote: >> Rhino, >> That for getting back to me. I am coding with Java 1.5(or whatever >> they call the latest version). I >> have all the framework done and can create the table without the >> images. >> I would prefer not to have to write the image to the file system since >> there could be many photos being displayed depending on the parameters. >> I have a person class that has one Blob field image_data and five >> String fields(name, location, etc.). >> I need to write that image_data field to the response along with the >> other fields in the servlet so that the image is displayed on the web >> page. >> Thanks >> Calvin >> >>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]