wood burning stoves 2.0*
The moose likes JSP and the fly likes Downloading the jsp as .csv file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Downloading the jsp as .csv file." Watch "Downloading the jsp as .csv file." New topic

Downloading the jsp as .csv file.

Kaustubh Patil
Ranch Hand

Joined: Aug 13, 2001
Posts: 164
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. Mumbai, India.
Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
CSV stands for comma separated values.
So, you can set your content type to text/plain.
Joe Pardi
Ranch Hand

Joined: Oct 03, 2001
Posts: 47
Anothe rcommon way to do CSV is to set the page's content type to "application/csv".
It is sorta covered in the JavaRanch Style Guide.
subject: Downloading the jsp as .csv file.
Similar Threads
hi, i have problem in reading data
lading data from file into database
Export data from Jsp to Excel taking more load time
Help with File download
Text file xls to Binary format xls in Java.