• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to insert and retrieve image into Db using Struts2

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, Im trying to insert the image into database and same image retriving when the the same user login the page means i want to set that image as Profile picture of the particular user..Please help me out of this, i want code for this same...Thank you in advance
 
Greenhorn
Posts: 9
Eclipse IDE Tomcat Server Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wow, a good question, there are two ways to sovle it
one way, you can let image into binary and insert your database, It is troublesome to convert binary into image or image into binary
another way, You can save the image's path to database.

We usually choose second ways .
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sushant Gandhi wrote:Hello everyone, Im trying to insert the image into database and same image retriving when the the same user login the page means i want to set that image as Profile picture of the particular user..Please help me out of this, i want code for this same...Thank you in advance



Here are a couple of references for you:

- Inserting file data to database
- Retrieving file data from database
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic