• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Download a file from the server using Java Servlet

 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am executing a Stored PRocedure by passing the parameters
using JDBC and Java Servlets. After the execution, the stored procedure generates a data and that data is stored on oracle on unix. I want the ability to download that data(or file) onto
my local machine(user's local machine).
Do anyone has any code that does that or any ideas.
thanks
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the Oracle column type that you are trying to retrieve?
 
Bhasker Reddy
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it's a file, like export.out, i need to get that file onto my
local machine from the oracle on unix box.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you said "and that data is stored on oracle on unix. I want the ability to download that data(or file)." I assume that you have already written to a database and you just want to extract the file that you've stored. I don't know of any file datatype. The only oracle data types that I know of are CHAR, NCHAR, VARCHAR2, NVARCHAR2, NUMBER, DATE, RAW, BLOB, CLOB, NCLOB, BFILE, LONG, LONGRAW and ROWID...but no file type. I'll assume BLOB/CLOB? you can find source code put out by oracle at http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html . Look for the "JDBC Advanced Features Samples" link.

Jamie
[This message has been edited by Jamie Robertson (edited September 24, 2001).]
 
Bhasker Reddy
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you got me wrong. I don't want to extract the file. I want the
file to download onto my local machine IN OTHER WORDS I WANT IT
FTP THE FILE FROM ORACLE/UNIX TO MY LOCAL MACHINE.
i WANT TO HAVE A BUTTON, WHICH WHEN CLICKED SHOULD BE ABLE TO
POP UP A DIALOG BOX ASKING TO SPECIFY THE DIRECTORY ON THE LOCAL MACHINE TO SAVE THE FILE.
THE FILE
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic