Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JDBC and Relational Databases and the fly likes How do I insert a BLOB from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

How do I insert a BLOB from a servlet

Aditya Vasudeva
Ranch Hand

Joined: May 27, 2008
Posts: 76
I have a web page in which i have a browse button which selects an image on my local hard disk. I have a submit button which submits the file to the server.

How do I insert this image into a BLOB attribute in a table of my database.
The data type of the image specified in the database is type BLOB.

Please specify the code if possible.

Please help.
Thank You.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63838

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: How do I insert a BLOB from a servlet
It's not a secret anymore!