This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 60046
    
  65

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
 
Similar Threads
FileUpload and File type
JSP / Servlet upload images
How to upload only image file
Uploading an image to a server or to database?
how to upload pdf files to My sql with java