• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Serve up excel files via JSP

 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy ranchers,
I've got a few excel reports which I need to make available via a JSP.
My problem is two fold:
1. I need to store the excel files into an Oracle 10g DB.
2. I need to make these files downloadable via a JSP.

I suppose #1 doesn't really belong here, but I'm hoping someone has already done this and will share their knowledge.

Any tips/pointeres/references on how to do this? I've googled around and tried to first figure out how to store excel files in an Oracle table, but I'm still struggling with getting it done successfully.
Once I do get that done, though, once a user clicks on a button to get the report, what is a good way of offering the file for download?
Thanks,
Sasikanth
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a couple of good ways to download the file, but none of the good ways involves a JSP in any way. JSP is meant for generating HTML. It can be stretched to generate other text formats, but Excel doesn't use a text format to store its data.

You should simply use a download servlet. JSP is the wrong tool for the job here.
 
Sasikanth Malladi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am flexible. How can it be done with a servlet?
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read the Ranch's FAQ page ImageServlet (skip over the part which is specifically about images, though).
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic