Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Exporting table data to a .csv file client side

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,
I have a typical problem, for which I am looking for suggestions/advise.
The requirement is that I have to export data from a table(based on some search criteria) to a .csv file.. on the client side.

There would a export button on the jsp page clicking on which, the displayed data has to be saved on the client system.

Thanks in advance
Regards
Shashikant
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a forum specially for JSP questions, I'll move this over there.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually it would probably better be done in a servlet.

The easiest way would be to requery the data, and then just write it out as a CSV.
Set the response headers to prompt the user to save the file
 
shashikant nagavarapu
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

I am using the same but as the file is not a static one, and data varies each time. I need to add data to the response and using the getWriter(). My problem with this is that the number of such records may be many and adding huge data to the response object may be resource intensive operation. Meanwhile simultaneous operations are alos supported.

It would be great, if there is any less intensive method for handling the situation.

Thanks in advance.

Regards
Shashikant
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic