I recommend trying to upload a file to a database without using a JSP to get some practice, then combine it with a JSP for the full solution (without putting JDBC inside of a JSP as this is a horrible practice).
Jenifer Rajkumar wrote:Please send me with some example, because iam beginner and new to java.
This is what tutorials have been invented for. Anyone trying to access database from Java should read a JDBC tutorial thoroughly. You might try this tutorial, for example.
Files are usually stored in BLOB fields and blobs manipulation is covered by most JDBC tutorials. Searching for "BLOB" here on Javaranch will undoubtedly bring up some examples too. If something is still unclear afterwards, come back here and ask specific questions; you'll obtain much better response that way.
Joined: Jan 05, 2012
I read the tutorial, but still i can't get answer for my question please help me to upload file into database useing java.
Look carefully at the code examples in the tutorial. If something is not clear, try reading the Java documentation of the methods that seem unclear to you. If it's still hazy, come back here, show us the code you've written and tell us what does not work as you'd expect. We'll be glad to answer specific question.