aspose file tools*
The moose likes Servlets and the fly likes Upload-Download Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Upload-Download" Watch "Upload-Download" New topic
Author

Upload-Download

Ashish Malik
Ranch Hand

Joined: Jul 11, 2010
Posts: 50
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

Joined: Jul 04, 2011
Posts: 12
in the download servlet do not forget contentType
Bhardwaj kapoor
Greenhorn

Joined: Aug 06, 2011
Posts: 1
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.


Nurse Assistant | Certified Medical Assistant | Is Clinical Youth Complex
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Upload-Download