This discussion is archived
1 Reply Latest reply: Jan 9, 2013 1:24 AM by gimbal2 RSS

DATABASE AND JAVA

983681 Newbie
Currently Being Moderated
hie friends

1. how to upload a .doc file into a oracle database from a required location in the OS (i.e should have an option browse for browsing a .doc file from which ever location we want)

&


2. how to retrieve the .doc file in oracle db to the specified location in the OS?


i need it through JSP Servlet technology friends


Thank You.
  • 1. Re: DATABASE AND JAVA
    gimbal2 Guru
    Currently Being Moderated
    980678 wrote:
    hie friends

    1. how to upload a .doc file into a oracle database from a required location in the OS (i.e should have an option browse for browsing a .doc file from which ever location we want)
    HTML file upload component in a HTML multipart form, basic file IO on the server side, store it in a BLOB column using JDBC
    2. how to retrieve the .doc file in oracle db to the specified location in the OS?
    You use JDBC to retrieve the BLOB column data through an input stream, you use a servlet to stream the data to the response's output stream, setting the correct content type before you do that. Google: Microsoft word http content-type.
    i need it through JSP Servlet technology friends
    Lucky for you Google can find you countless examples on how to technically achieve what you want (so don't bother asking for sample code). All you need is knowledge of the technology you're using and half a brain. Good luck!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points