Hi,

I guess you could write the URL to all images from the database as
'/databaseimage/<primary key>'. For example: '/databaseimage/13'. Then you
map a servlet to /databaseimage. This servlet cheks the request URI for the
primary key, reads the file from the database and then sends it on the
response.

Regards,

Mikael Eriksson

> -----Original Message-----
> From: Paul Kofon [mailto:[EMAIL PROTECTED]]
> Sent: den 12 februari 2001 09:24
> To: Orion-Interest
> Subject: Displaying image files stored in a database
>
>
> Hi,
> I'm developing an web-based Employee Directory for my
> company. I've got it
> working all right.
> My problem is that I'd like to store the image files in a database
> (presently I'm using Hypersonic) and be able to display them
> as needed for
> each employee. However, I haven't been able to that. I worked
> aroud this
> problem by storing the images in the file system and entering
> a path to the
> required image file as a VARCHAR in the database. Eventhough
> it solved my
> problem, it is undesireable because I'd have to manually
> delete each image
> file that's no longer required instead of simply deleting a
> row in the
> database.
> I successfully stored each file as a Java object (in this
> case "File") but I
> just couldn't think of a way to display it on a web page. I'm
> sure this is a
> piece of cake for most of you out there but I just can't
> figure it out. Any
> he.....lp would do. Thanks.
>
> Regards,
>
> Paul
> ______________________________________________________________
> ___________
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
>
>


Reply via email to