Ruchika Kapoor wrote:Thanks Ulf Dittmer!
Your suggestion worked.
Nur Mohammad Shahin wrote:Do you have the 'commons-io.jar' in your class-path?
If you are using 'commons-fileupload.jar' then it is dependent on 'commons-io.jar'.
So, you have to keep the 'commons-io.jar' in your class-path.
Ulf Dittmer wrote:What do you mean by "upload to the database"? Do you wish to store the bytes that make up the file in a binary field in the database? If so, you can use an attribute of type BLOB.
Servlets can handle file uploads by way of the Apache Commons FileUpload library.