Solved

Export an oracle table to csv on a jsp page

Posted on 2010-09-13
4
650 Views
Last Modified: 2013-12-19
Either using Servlets or JSP, how would I make an HTML link on my jsp page that would allow the user to download a table inside of Oracle as a CSV?
Thanks.
0
Comment
Question by:indsupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:ravindran_eee
ID: 33664118
I do not know much about JSP. But your requirement can be met with an Oracle stored procedure. Check the below link for implementation of the stored procedure

http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:88212348059

You can provide link to the generated CSV file in your HTML file. The stored procedure can be executed on batch everyday (oracle jobs maybe) or execute on-demand basis (like button press)

Hope this helps!
0
 

Author Comment

by:indsupport
ID: 33665865
Funny you should like to that post.  I'm already using that stored procedure to export to a local file.  I don't want to use the local file system, however.  I want to have everything directed to stdout.  Similar to how it is done using PHP with mysql:

http://snipplr.com/view/2234/export-mysql-query-results-to-csv/
0
 
LVL 27

Accepted Solution

by:
mrcoffee365 earned 500 total points
ID: 33668308
The same process works for JSP.  See these questions asked and answered on EE about returning csv files in a JSP:
http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_22127947.html
http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_25029853.html

You have a lot of open questions -- it would be great if you went through and awarded points to the experts who have helped you.
0
 

Author Comment

by:indsupport
ID: 33782956
Still researching, will let you know -
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question