#######Viewing a Blob object ######
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vimal_Nair
Posted On:   Wednesday, November 20, 2002 01:25 PM

Hi, I would really appreciate if someone can tell me how to view a word document stored as a blob object in oracle 8i database.(ie. if you click on a link on a jsp page, it should retrieve the blob object (which is a word document) from the database and should open this word document in the default viewer..say ms word...)

Re: #######Viewing a Blob object ######

Posted By:   Lasse_Koskela  
Posted On:   Wednesday, November 20, 2002 02:03 PM

Write a servlet, which does roughly the following:

  • Fetch the BLOB (raw byte data) from the database.

  • Set the response object's content type with setContentType("application/ms-word"); (don't know the exact MIME type for Word docs)

  • Get an OutputStream for the response and write the BLOB data into that OutputStream.

About | Sitemap | Contact