Raghav,
I m not getting ur prob, as per my understanding..u want to get image from client machine using <input type=File> tag and upload it to server and then store that image to ur database...
I would suggest first use multipart request from
www.servlets.com to upload the file to temporary folder on server and then use following code to save into the database.. hope this will help u..
{
...
File file = new File ("Logo.gif"); //use the actual file path
//from server
InputStream inStream = new FileInputStream ("Logo.gif");
PreparedStatement psmt = conn.prepareStatement
("INSERT INTO myTable (pk_field,img_field) VALUES
(?, ?)");
//mytable with two columns Varchar and Long raw
psmt.setString (1, "Logo");
psmt.setBinaryStream (3, inStream, (int)file.length ());
psmt.execute ();
...
}