Attaching Documents

I am going to create an application which I can attach any file to my application.it is the same as attaching docs.in emails.But once I attach and submit it I want to save the attached document to SQL database so I can retrieve it when ever i needed.

Basically i am thinking of having 2 buttons,one called"attach" ,other "submit"

would someone be able to help me with writting the code?Once the file get saved,i also want to display it in the page.(list of all

attachments in the DB).

I am not even sure if i can save any file to the DB.what type of field name will it be?

Is it possible to do this using just java/javascript ?

Please help

[683 byte] By [kuhasaa] at [2007-11-26 14:53:48]
# 1
Duplicted here: http://forum.java.sun.com/thread.jspa?threadID=5124030Post relies there.
ChuckBinga at 2007-7-8 8:42:11 > top of Java-index,Java Essentials,Java Programming...