This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upload-Download

 
Ashish Malik
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to upload an image to my DB.
I am using servlet to upload and hibernate to store.
Everything is working fine but when i download image it doesn't show the image, although the file gets created as it is.

I tried saving it to some location immediately after uploading but same problem.

Here's my code snippet from servlet...

 
elvadas nono
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the download servlet do not forget contentType
 
Bhardwaj kapoor
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes if you do not specify the content type then how it will show the results because it is not getting the proper command to show the results exactly in which format.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic