File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Image Upload - Jsp or servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Image Upload - Jsp or servlet" Watch "Image Upload - Jsp or servlet" New topic
Author

Image Upload - Jsp or servlet

jill Na
Greenhorn

Joined: Dec 05, 2010
Posts: 11
Hi,

I am trying to let user be able to upload an image file (jpeg, bmp etc) from front end.
I am using Jsp for the file input type browsing. Servlet for uploading into a table (in mysql), table - has a columnBLOB type.

It sounds pretty easy = that let user upload the pic, store it in a table and pull it out when needed.
But I am not able to get it working -
1. How to extract the contents of the file which is being uploaded to insert in the table?
2. How to be sure its an image - just the extension?
3. I can upload any image in the table I have - but HAVE to user MySql Query browser for that ... how would that work from application point of view?
4. Any jar or already existing tool that could be used if 1-3 are not possible
God, I swear I tried very hard. But am stuck... need to be pulled out of here ...



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

See the JSP FAQ for information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image Upload - Jsp or servlet