hi,
I have a browse button for sending single image with other text inputs in jsp type I have chosen Multipart-Form data .
I got 'parameter not set error' for blob field.
I am using MySql database.
I am using DefaultFileItemFactory clss
FileItemFactory factry= new DefaultFileItemFactoy();
FileUpload upload= new FileUpload(factry);
List FileItem= upload.parseRequest(request);
Iterator i= FileItem.iterator();
while(i.hasNext())
{
File f=(File)i.next();
FileInputStream fi= new FileInputStream(f);
p.setBinaryStream(15,fi,(int)f.length());
}
Is while loop necessary? If not, How can i avoid iteration? and how to make the code insert image?