Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Downloading the jsp as .csv file.

 
Kaustubh Patil
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement in my application that the data displayed on the jsp should be downloaded as .xls and .csv file.
As far as .xls is concerned i can do it by setting the content type. But i have no clue about how to download it to .csv file.
any ideas ?
-Kaustubh.
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CSV stands for comma separated values.
So, you can set your content type to text/plain.
 
Joe Pardi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anothe rcommon way to do CSV is to set the page's content type to "application/csv".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic