• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to store and retrieve an image to database using in struts

 
Julie Jacob
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

How to store and retrieve an image in MySql using with struts. Anyone to know this please give me the solutions

thanks
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, the column type should be BLOB.
Second, your form property should be of type org.apache.struts.upload.FormFile
Third, in your action (assuming upload is name of property)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic