• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to store/retrive images from database  RSS feed

 
Anuragk kushwaha
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Anubody tell me please how to store images in database using jsp.
and how to retrieve them.


Please reply...

Anurag
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should generally avoid having database code directly in JSP pages - much better to move them to backing beans.

Check out the SQL type Blob (Binary Large OBject). It lets you store sizeable amounts of binary data in a database.
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can upload your file by getting the inputstream in your servlet and store it in the directory with in the server. Store the directory path with name of the image into the database.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by anuragk kushwaha:


Anubody tell me please how to store images in database using jsp.
and how to retrieve them.

Anurag


You didn't specify the Database to store and retrieve images so there is a link which is hopefully helpful to you. Example to store & retrieve images from Oracle database

inserting images into database using jsp

Regards,
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!