0

How I can display image from database MySQL in JSP?

And, how can I store the image in the database and not the path of it? I use only Servlet and JSP .

Unheilig
  • 16,196
  • 193
  • 68
  • 98

1 Answers1

0

You would need to store the image as a BLOB in the database. Later read the BLOB back and display it to the client. This link shows an example of storing images in Oracle DB. However, if you want to store too many images, I would think storing them on file system and the path in the DB is a better option. You should take a look at this SO post.

Community
  • 1
  • 1
User2709
  • 573
  • 5
  • 17