This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
would it require any file uploading code or just JDBC insert statement ?
It seems you are not clear about the technology. Since you are a gujarati would like to give some details.
File uploading is different then JDBC insert statement. File upload gives you data in binary stream. For storing image in database your database should support blob type. Moreover it is not advisable to store many images in database, best solution is to store it in a file system(ie. on your machine) and store the path detail in DB.
For file uploading and storing in the database you can use struts framework instead of writing everything by using servlet.
As Jignesh pointed out, it is not advisable to store image files in database, especially if you are using those images to be rendered on your web applications.
It is better to use a file system and refer to it. It will also be easier to modify the images. It will be more manegable if you want different images to be displayed for specific locales / user groups.
However, if you are allowing the user to upload files to your webapp, then you might need some secure file system to store it. Your webapp may either create a sub directory under that file system for each user or store all the files in the same location.
Thanks & regards,
When all else fails, follow instructions. - Allen's Axiom