First of all you should specify mime type of your file by
response.setContentType, for example "application/pdf"
for pdf files.
Also it will be useful to specify file name by
 res.setHeader("Content-disposition", "attachment;filename="+filename);
Then you read your file from database by
resultset.getBinaryStream and output it to client
by sending it to OutputStream (response.getOutputStream)

Vyacheslav Pedak


----- Original Message -----
From: Kiran <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 13, 2000 10:49 AM
Subject: File upload to database


> Hi Everyone,
> I am trying to upload a binary (.pdf, .doc, .gif etc) file to the
> oracle8i database table ( BLOB column). It is also required to download
> the file to the client machine from the database on request (HTML
> client). I searched the archives but was unable to find anything similar
> (wrt database). I would really appreciate if any of you could please
> give me tips/links on how to do the same.
> Thanks much.
> -Kiran.
>
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to