Display blob file

Quick Question:
Is it possible to display a file stored in an oracle blob field directly to the browser, without first writing it to the server?
My Situation:
I need to display the file associated with a given record. When the user selects the record I write the associated file to the server first as "default.pdf" and then display it from there.
When another record is selected, the browser doesn't recognize it as new (because it overwrites the old "default.pdf" maintaining the same name) and displays the old cached file.
I can give separate names to the files but this defeats the purpose of storing them in the database because then you have two copies of each, one in the db and the other on the server.
I have tried to delete the file after displaying it but it deletes before the response.sendRedirect() command and therefore has no file to display.
If anyone has the answer to the above question or another solution (perhaps to avoid the cache) it would be greatly appreciated.
Thanks,
Garbo Dumpster (I will post the code if my explanation was not clear)

Following is the code sample:
Blob aBlob=null;
aBlob= (Blob)rs.getBlob("BLOBCOLUMNNAME");
long bloblength = aBlob.length();
long offset = 1;
int lenread=0;
int buffersize=1024;
int size;
InputStream is = aBlob.getBinaryStream();
byte[] buffer = new byte[buffersize];
response.reset();
response.setContentType("whatever"); //can store it in database and retrieve
ServletOutputStream out=response.getOutputStream();
response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\""); //filename can stored in database and retrieved
for (long pos = 0;pos<bloblength;pos+=buffersize)
lenread=is.read(buffer,0,buffersize);
if (lenread<buffersize)
size=lenread;
else
size=buffersize;
out.write(buffer,0,size);
}

Similar Messages

  • Display BLOB File (pdf format) from database inside Oracle Form (6i)

    hi all.
    Apologies for a primitive question owing to the fact that i m new to development. I have a requirement to display a pdf document with in an oracle form. i want to know is there any such control for that? or any hint how to go about it?
    thanks in advance

    Here I have found my jsp script...
    How I get the PDF?
    I call my script from pl/sql with
    web.show_document('http://my_server/getblob.jsp?id=' || id_from_my_blob_table || '&baza=myhost:1521:sid','_blank');
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="oracle.jdbc.driver.OracleDriver" %>
    <%@ page import="oracle.jdbc.driver.OracleResultSet" %>
    <%
    Connection con = null;
    Statement stmt = null;
    ResultSet rs= null;
    oracle.sql.CLOB clob = null;
    oracle.sql.BLOB blob = null;
    String datoteka = "";
    String host = "http://" + request.getHeader("host") + "/";
    %>
    <!--Peter Valencic 2003 -->
    <html>
    <head>
    <title></title>
    </head>
    <%
       String tip ="";
       String id ="";
       String baza ="";
       String shema ="";
    try
       id = request.getParameter("id");
       baza = request.getParameter("baza");
       shema = request.getParameter("shema");
       if (request.getParameter("id")== null)
          throw new Exception("id= null");
       else if(request.getParameter("id").equals(""))
          throw new Exception("id= null");
       if (request.getParameter("baza")== null)
          throw new Exception("baza= null");
       else if(request.getParameter("baza").equals(""))
          throw new Exception("baza= null");
       if (request.getParameter("shema") == null)
         shema ="";
       else if (request.getParameter("shema").equalsIgnoreCase(""))
         shema="";
       else
         shema =shema + ".";
    catch(Exception e)
       out.println("Priąlo je do napake: " + e.toString());
       return;
          try
                Class.forName("oracle.jdbc.driver.OracleDriver");
                con = DriverManager.getConnection("jdbc:oracle:thin:@"+baza,"your_user","your_password");
                stmt =con.createStatement();
                rs = stmt.executeQuery ("Select * from "+shema+"DOK_VSEBINA_DOKUMENTA_BLOB where ID="+id);
                boolean podatkib = rs.next();
                if (!podatkib)
                   out.print("<li>Ni podatkov za  ID="+id);
                   return;
                blob = ((oracle.jdbc.OracleResultSet)rs).getBLOB("VSEBINA");
                datoteka = rs.getString("NAZIV_DATOTEKE").toUpperCase();
                   File blobFile = new File(application.getRealPath("/uploads/blob")+"/"+datoteka);
                blobFile.createNewFile();
                InputStream podatki = blob.getBinaryStream();
                FileOutputStream strBlob= new FileOutputStream(blobFile);
                int size = blob.getBufferSize();
                byte[] buffer = new byte[size];
                int length = -1;
                while ((length = podatki.read(buffer)) != -1)
                   strBlob.write(buffer,0,length);
                podatki.close();
                strBlob.close();
                con.close();
                out.print("<li>"+host+"in2/uploads/blob/"+datoteka);
                   response.sendRedirect(host+"in2/uploads/blob/"+datoteka);
                //odpremo z jsp-stranjo datoteko..
                //response.sendRedirect("");
          catch(Exception blobException)
             out.print("<li>(BLOB)Napaka pri prebiranju podatkov:</li>"+blobException.toString());
             return;
    out.println("konec..");
    %>
    <body>
    <form method="post">
    Vnesi ID
    <input type=text name="id">
    <li> <input type=submit name="potrdi" >
    </form>
    </body>
    </html>If you look my "old" script..
    first it get 2 parameters baza= database (ip:port:sid), id= id from my table (PK)
    at the end of my script I have:
    response.sendRedirect(host+"in2/uploads/blob/"+datoteka);
    this redirect will redirect you to your file stored on server side..
    Because IE knows what file it must open it will open it with PDF reader...
    hope this help you..
    Edited by: peterv6i.blogspot.com on May 14, 2012 11:14 AM

  • Display blob file with oracle forms

    I need to display an image file with oracle forms.
    can any body tell me how to do this ?
    Thanks

    How to do this is dependent on which version of Oracle Forms you are using. Please let us know what version (eg; 10.1.3.x.x not 10g) of Oracle Forms you are using and how your application is deployed (Client/Server or web). If web, what is your Java version?
    Craig...

  • Display in browser blob files (.doc, .pdf...) stored in the Database

    Hi,
    I want to display blob file from de DB to the browser, but when I click on the link of the document I want to open, nothing append. If I check the length of the file it is correct. I tried to write it in a directory to see what appends. I can only write txt file. The other files are corrupted.
    I did something like in the topik 532271.
    Did I do something wrong ? Do I have to write some code in the web.xml ?
    Here is my code :
    public DataOutputStream showBlob() throws SQLException, IOException{
    //it is my class not those from java.io
    File file = (File) this.getFiles().getRowData();
    FacesContext faces = FacesContext.getCurrentInstance();
    HttpServletResponse resp = (HttpServletResponse)faces.getExternalContext().getResponse();
    Blob b = file.getBlob();
    int len = 0;
    InputStream is = b.getBinaryStream();
    long length = b.length();
    byte[] x = new byte[10240];
    resp.setHeader("Content-Disposition","filename=\"" + file.getFileName() + "\"");
    resp.setContentType(file.getMimeType().getMime());
    resp.setContentLength((int)length);
    DataOutputStream o = new DataOutputStream(resp.getOutputStream());
    while ( (len = is.read(x)) != -1)
    o.write(x, 0, len);
    o.flush();
    o.close();
    is.close();
    faces.responseComplete();
    return o;
    In my xhtml page I have :
    <ice:commandLink id="downloadLink"
    action="#{managerBean.layoutManager.ediTraining.showBlob}"
    value="#{file.fileName}" target="_blank">          
    </ice:commandLink>
    Thank you for your response.
    Edited by: joce77 on Nov 12, 2007 7:39 AM

    Hi BalusC,
    I did what you explant on this page http://balusc.blogspot.com/2007/07/fileservlet.html whit "FileServlet serving from database".
    When I clik on the link I got an empty page with this html code :
    <iframe id="history-frame" src="/uniform/xmlhttp/blank" style="z-index: 10000; visibility: hidden; width: 0pt; height: 0pt; position: absolute; opacity: 0.22;" title="Icefaces Redirect" frameborder="0"></iframe>
    <script id="dynamic-code" language="javascript"></script>
    <script id="focus-code"></script>
    <script id="select-code"></script>
    <script id="click-code"></script>
    <script id="configuration-script" language="javascript">window.session='YXtNt2XZnElULb3t0j_7BQ';
    document.getElementById('configuration-script').parentNode.viewIdentifier=1;
    if (!window.views) window.views = []; window.views.push(1);
    window.configuration = {synchronous: false,redirectURI: null,connection: {context: '/uniform/',timeout: 30000,heartbeat: {interval: 20000,timeout: 3000,retries: 3}}};
    </script>
    Any idea ?
    Thanks

  • Html db to display pdf files saved as blob in the data base

    Hi all,
    I have a DB page to call next page to display pdf files.
    A procedure is being called when the link is clicked on the first page.
    However, the procedure output a juck code insteand the pdf files. Please help.
    Thanks,
    n_length number;
    n_image BLOB;
    begin
    select note_image, dbms_lob.getlength(note_image)
    into n_image, n_length
    from n100_notes where note_id = nid;
    owa_util.mime_header('application/pdf');
    htp.p('Content-length: ' || n_length);
    wpg_docload.download_file(note_image );

    we use:
    owa_util.mime_header('application/pdf',false);
    htp.p('Content-Length: ' || dbms_lob.getlength(l_blob));
    owa_util.http_header_close;
    wpg_docload.download_file(l_blob);
    see plpdf.com
    LL

  • Displaying the BLOB files(PDF,TXT,IMAGE,etc) in the Form as an Attachment

    Hi all,
    I need to Open a file which is stored in the Data base Table & the Data type is of BLOB so i am populating the data but i need to display the attachment which is stored in the BLOB file when the button is clicked & i am using Oracle 10g
    I have been just placed a Button & written the below code in WHEN_BUTTON_PRESSED Trigger & i have tried it out by placing a image icon & WHEN_IMAGE_PRESSED but it's not getting worked
    It is Directly Coming in to Exception..
    DECLARE
    vblob BLOB;
    vmime VARCHAR2(30);
    BEGIN
    select attachment,MIME_TYPE into vblob,vmime
    from Table_name_a
    where UNIQUE_ID = 16842;--:ITEM_RESULT.DRAWINGNO;
    htp.init;
    owa_util.mime_header( vmime, false);
    -- owa_util.mime_header( 'image/jpeg', false);
    -- owa_util.mime_header( 'image/jfif', false);
    -- owa_util.mime_header( 'image/gif', false);
    -- owa_util.mime_header( 'application/word' , FALSE);-- to read MS WORD doc
    owa_util.mime_header( 'application/pdf' , FALSE);-- to read ADObE
    message ('attachment type is' ||vmime);
    message ('attachment type is' ||vmime);
    owa_util.http_header_close;
    wpg_docload.download_file(vblob);
    exception
    when no_data_found then
    dbms_output.put_line('1. attachment type is' ||vmime);
    -- NULL;
    end;
    so if any body has any idea Please let me Know
    Hope for the Reply.
    Thanks & Regards
    K Nikethan Reddy

    Hi,
    Thanks for the reply,
    The Document which u Refer is Showing how to Retrieve the Files from the Local System (i.e by giving the path) but i need to populate it from the database.
    K Nikethan Reddy.

  • Display blob content as pdf file

    Dear Expert,
    Currently i'm using oracle apex 3.0.1.
    I'm having a problem on displaying blob content (from database table) as pdf file on oracle application express but i'm able to save to download the pdf.
    Below is the procedure that i used to display blob content,
    PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    begin
    selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
    into lob_loc,l_length
    from ord_img
    where oi_tno= pv_image
    and oi_ti='PDF'
    and oi_idx=pv_index;
    exception
    when others then
    null;
    end;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END lf_html_pdf;
    I get the error message as below when i execute the procedure above;
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    *06502. 00000 - "PL/SQL: numeric or value error%s"*
    I'm appreciated if expert can have me on the problem above?
    Thanks
    From junior

    *Always post code wrapped in <a href=http://wikis.sun.com/display/Forums/Forums+FAQ#ForumsFAQ-Arethereanyusefulformattingoptionsnotshownonthesidebar?"><tt>\...\</tt> tags</a>:*
      PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
         l_mime        VARCHAR2 (255);
         l_length      NUMBER;
         l_file_name   VARCHAR2 (2000);
         lob_loc       BLOB;
      BEGIN
          begin
            selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
            into lob_loc,l_length
            from ord_img
            where  oi_tno= pv_image
              and oi_ti='PDF'
              and oi_idx=pv_index;
          exception
                when others then
                null;
            end;
         OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
         HTP.p ('Content-length: ' || l_length);
         OWA_UTIL.http_header_close;
         WPG_DOCLOAD.download_file (lob_loc);
      END lf_html_pdf; Start by getting rid of:
          exception
                when others then
                null;and never using it anywhere ever again.
    If you're not actually going to use the <tt>l_mime</tt> and <tt>l_file_name</tt> variables then remove these as well. (Although I really think you should set a filename.)
    >
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    06502. 00000 - "PL/SQL: numeric or value error%s"
    >
    The error stack indicates that the exception is being raised in <tt>HCLABPRO.PKG_PDF</tt>: what is <tt>HCLABPRO.PKG_PDF</tt>? Does this actually have anything to do with the procedure above?
    I get the error message as below when i execute the procedure above;How do you execute it?
    What happens when it's executed without the <tt>when others...</tt> built-in bug?

  • How to display PDF BLOB file within Forms

    Hi All:
    I just want to know if is it possible to display PDF blob file within the forms. Currently I use webutil to open pdf in browser. This time I need to display it in forms, so that upon scrolling, the user can view the pdf images of that particular record.
    TIA

    Hello,
    <p>Did you see this Java Bean ?</p>
    Francois

  • HELP !! displaying BLOB or intermedia file

    Hi !
    I've uploaded my document (image or text) to database using form portlet successfully.
    I've tried using BLOB file and intermedia (ORDIMAGE) instead.
    In order to display it, I've tried several ways, but none is working :(
    First, I've tried to use Portal Report(when I use intermedia data type) and activate 'the embed intermedia rich content in the report' option in display options.
    But it didn't work. The image won't displayed, just cross sign appear, like the image doesn't exist or wrong path.
    Even I've followed the instruction given by OTN (live-demo).
    The Second, I tried to use BLOB data type and use PL/SQL gateway to display it.
    The procedure is (I got it from PL/SQL Gateway Overview):
    procedure download_docs is
    mydocs blob;
    begin
    select documentfile into mydocs from album where id = 1;
    owa_util.mime_header('text/html', FALSE);
    htp.p('Content-Length: ' || dbms_lob.getlength(mydocs));
    owa_util.http_header_close;
    wpg_docload.download_file(mydocs);
    end;
    but it came with 'The page cannot be displayed', even I've grant execute privillage to public for the procedure.
    FYI, the table and the procedure is in same schema.
    And the third, I've got frustated :)
    Could anyone tell me what was wrong ?? Please.....
    Thanks alot...
    Moza

    Hi Faizal,
    If your requirement is just to show up/Display the blob document ..Here is how we did it
    1.You create a form based on this table
    2.Before creating the Form make sure that one column Mime_type added in your table
    3.When you create the form on the blob field you will be asked to store the blob info ..you select the mime_type for that
    4.When you querry the form you get a link to the blob document and you can view or display it.
    ii.To show the blob's in a report yyyyyyyyy it's a big exersise and need to access few system tables .You please let me know if the above doen't work for you.
    Thakns
    Vishnu Singireddy

  • Radio Button group with images stored as BLOB files in database

    Hey all!
    I have radio button group, my idea is that radio button's LOV must display images, I mean BLOB files stored in a table.
    How can I do this?

    Hello Ken,
    I asked similar question in the past, and I believe the answer is still the same.
    Select List as an option of a Radio Group
    In your case, I think you can use a select list with added functionality, like "Select List with Branch to Page" or "Select list with Submit", or you can just attach an onChange event (JavaScript) to each select list. The effect should be similar to a radio group – as soon as the user select one item from any of the select lists, you can fire some action, based on the select list value.
    Hope this can help,
    Arie.

  • How to retrieve blob file

    i am having a problem retrieving my blob file(PDF) to display on browser.
    i have this code below:
    $filename = $row['FILENAME'];
    // Call the load() method to get the contents of the LOB
    print $row['BINFILE']->load()."\n";
    header('Content-type:application/pdf');
    //header("Cache-Control: private",false); // required for certain browsers
    header('Content-Disposition: attachment; filename="'.$filename.'"');
    readfile($filename);
    echo $row['BINFILE'];
    this will display some characters when opened at mozilla. when opened on IE, this doesn't display pdf on the browser instead it will only allow to save the file.
    hope anyone can give me some advice n some assistance on this.
    thanks
    Edited by: tamse on Jul 7, 2009 7:16 PM
    Edited by: tamse on Jul 7, 2009 7:19 PM

    I've got an example on my blog that might help, it's using a PNG. You can find it here:
    http://blog.mclaughlinsoftware.com/php-programming/oracle-lob-processing/

  • Display gif files using servletoutputstream (again)

    Hello,
    I'm trying to display several gifs files in a html file. I extract all the files from an oracle database. I'm trying to use a servletoutputstream, but it does not difference between text and image.
    Process:
    1. Select html file from database
    2. Go through each line of html file to find the links to gif files
    - if gif :
    3. Ask for the gif file detected and select from database
    4. use servletoutputstream to display the file
    - end of if
    -else
    5. display the line of text.
    Is it possible to use a servletoutputstream to display several gifs and text content?
    Is there one other solution to do it correctly?
    Thanks in advance,
    Angela.
    The code I use is:
    private void retrieveFile()
    FileWriter fwHtml=null;
    oracle.sql.BLOB blob=null;
    InputStream in=null;
    ServletOutputStream out=null;
    ResultSet rsGif=null;
    try
    //Extract html file from the database
    String query="SELECT * FROM DBFiles WHERE FILENAME='"+file+"'";
    PreparedStatement ps = connection.prepareStatement (query);
    ResultSet rs=ps.executeQuery();
    rs.next();
    String fileName=rs.getString("FILENAME");
    if (fileName.indexOf("html")!=-1)
    InputStream fis=rs.getAsciiStream(5);
    //I read each line to know where the html file calls the links to the gif files
    BufferedReader reader= new BufferedReader(new InputStreamReader(fis));
    String line;
    String mimeType="";
    try{
    while ((line=reader.readLine()) !=null)
    if((line.indexOf("img src="))!=-1)
    int imgIndex=line.indexOf("img src=");
    int altIndex=line.indexOf(" alt=");
    //I obtain the name of the gif file that I obtain from the database
    String gifFile=line.substring(imgIndex+9,altIndex-1);
    query="SELECT * FROM DBFiles WHERE FILENAME='"+gifFile+"'";
    ps.clearParameters();
    ps = connection.prepareStatement (query);
    rsGif=ps.executeQuery();
    rsGif.next();
    blob=((OracleResultSet)rsGif).getBLOB("GIF");
    String gifName=rsGif.getString("FILENAME");
    mimeType = context.getMimeType(gifName);
    response.setContentType(mimeType);
    out = response.getOutputStream();
    in=blob.getBinaryStream();
    int bufferSize=blob.getBufferSize();
    byte[] buffer = new byte[bufferSize];
    int bytesRead=0;
    int intBuffer=in.read(buffer);
    while ((bytesRead=intBuffer)!= -1)
    out.write(buffer,0,bytesRead);
    in.close;
    else
    byte[] bString =line.getBytes();
    mimeType = context.getMimeType(fileName);
    response.setContentType(mimeType);
    out.write(bString,0,line.length());
    catch (IOException ioe) {
    System.out.println("Unable to open Image file "); ioe.printStackTrace();
    finally {
    if (out != null) {
    out.flush();
    out.close();
    ps.clearParameters();
    connection.commit();
    rsGif.close();
    rs.close();
    ps.close();
    catch (SQLException sqle)
    sqle.printStackTrace();
    catch (Exception e)
    e.printStackTrace();

    Let's put it this way, since I don't have the patience to look at your code. HTML cannot have images embedded in it, it can only have links to images. So you could have a servlet that sends an image, but only a single image and nothing else. I see you have code to set the MIME type of the image, so I don't have to tell you about that.

  • Displaying BLOBs

    Recently i've been working on a rather modest application, which lists contacts. When a detail-link was clicked, a popup would come up with more details and an image of that contact.
    The table this was based on contained a column photo_reference, which held a path to a folder under /i/. With this setup, it was easy to get the images working for each contact.
    The popup i showed was a bunch of htmlcode i put in the region footer, and hid. When the detail was clicked, i retrieved data via an application process, and show a modal dialog.
    Now the scope has changed: users need to be able to upload their own images. So, i went to work and made it so the images get uploaded into wwv_flow_files, and then i move them to a new contact_image table. So far so good. But now i want to display these pictures, and here i'm kind of stuck.
    * I could include a column in my IR, and put a blob format mask on it with image. I've got this working, but annoyingly. My image table has as primary key the field 'ID'. My contacts table also has 'ID' as PK.
    The format mask: IMAGE:APXT_CONTACTS_IMG:SMALL_PHOTO:ID::::::inline:.
    Here the PK field (ID) works with the PK of my base table (contacts). My link between tables is apxt_contacts.contact_image_id->apxt_contacts_img.id . The way i could make it work is to rename my id field in the image table to contact_image_id. (why couldnt it just take the column it's based on as the value :( ). I could then hide the column, and take the image with javascript to show in my popup. Also, this way preloads all images for the amount of selected rows.
    * get_blob_file_src also seems no use to me because of the limited use of the parameters (page items required etc).
    * I'd much rather be able to get the image blob via ajax to then display in my popup, but i have no clue as to how to do this. I've made a stored procedure which gets the file to download and call this from an application process (ajax callback), and with firebug i can see the post/response, but i wouldn't know how to get this displayed as an image.
    begin
    SELECT mime_type, lengthb(small_photo), filename, small_photo
    INTO v_mime, v_length, v_filename, v_lob
    FROM apxt_contacts_img
    WHERE id = p_contact_image_id;
    OWA_UTIL.mime_header (NVL (v_mime, 'application/octet'), FALSE);
    HTP.p ('Content-length: ' || v_length);
    OWA_UTIL.http_header_close;
    wpg_docload.download_file (v_lob);
    end;
    This way i'd only have to load the pictures of links clicked.
    I'd rather not have to grant execute to public and call the stored procedure via the link, but if this is my only route, id rather go solve it the first way.
    Instead of my existing code, should i make this work through creating another page, and juggle page items and their values around to try and get the same layout going, and then get that page through ajax? This would also mean extra work, im trying to minimize impact (=work) on the existing app.
    tl;dr: is it possible to retrieve an image blob from a table not in the report query, preferably through ajax?
    This is Apex 4.02 on an 11g db
    Thanks,
    Tom (handle pending :) )

    Our clients are a mixture of everything from Win98 to XP, including some Macs. There's no single place on every client I can be guranteed to have write access to. Many of our Windows users don't have write access to most of their C: drive, for exqample. Our Windows users have a standard F: drive on the network, but our Mac users don't.
    So I would have to ask them via a file requestor where to save the file to for viewing. And since WEB.SHOW_DOCUMENT needs a URL anyway, it seemed it would be more "transparent" to the user to move the BLOB file invisibly to the Apache server and launch it from there.
    My guess is there's an Oracle BLOB utility out there that writes a BLOB back to a disk file. I'm just new to the whole BLOB process and am hoping someone could get me pointed in the right direction.
    Dave

  • How to display the file contents???

    Hi all,
    I have a JSP page which is suppose to display resource contents on clicking of href like this:
    <td><a href="">Click here</td>But the problem is, these contents are stored some where on the hard disk of the system inside the folder \\LMS\Resources\doc\knowledge.doc.
    some other file I have like:
    \\LMS\Resources\pdf\display.pdf
    It can be any file (PDF,DOC,SOUND AUDIO).
    Can anyone please tell me how to open the contents of the file directly from href???
    Or I should use some other way to display those files.??I just want a way to start with.......
    Thanks in advance
    Namrata

    Hello Namrata,
    There are millions of ways to do this.
    1. You can create a shared drive in your server as "\\LMS\Resources" pointing to K Drive etc... You can write a simple servlet which picks up the relative path from "\\LMS\Resources" which is "pdf\display.pdf" and it can read the file and then based on the file extension it can resend the response mime type for the browser to pick it up. This can be done in both Windows and Unix environments.
    2. Have a Content Management System like Lotus Domino, Fatwire, etc and upload all contents and point the href to the Content Management System URL.
    3. You can upload the documents into a database as BLOB data and then use it to render content.
    4. You can also have a regular program which synchronizes the data from \\LMS into the Server hardware in a particular location.
    In Options 1, 3, 4 you need the servlet to render the content out to the Client browser.
    All this can be done based on the Technology environment, cost available to spend, Skill sets available and other factors.
    Do let me know if you need any more information
    Thanks,
    Pazhanikanthan. P

  • In a region iframe src a blob file problem?

    hi ,
    I try to make an example like this:I have a table which store blob files.And I try to see the file content in html region
    htp.p('<iframe src="ptest?n='||:P1_FILE_ID||'" width="650" height="450" />
    </iframe>
    <item name="deneme" type="button" onclick="doSubmit(NEXT)"></item>');
    to display the file in a frame but ı cant see in the frame.when button next submit the other file must be seen but always alert open file or save message but ı dont want this ı want to see the file content in iframe region.Can you help.
    thanks.

    This is how i am setting the property.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModuleImpl am =(OAApplicationModuleImpl)pageContext.getRootApplicationModule();
    OAPageLayoutBean pagelayoutbean = pageContext.getPageLayoutBean();
    OAStackLayoutBean stacklayoutbean = (OAStackLayoutBean)pagelayoutbean.findIndexedChildRecursive("xxdbdIROneTimeAddressRN");
    if("enableaddress".equals(pageContext.getParameter(EVENT_PARAM))) {
    stacklayoutbean.setRendered(true);
    The region 'xxdbdIROneTimeAddressRN' is having messagelovinput bean.

Maybe you are looking for