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

Use download link to get data in CSV format in JSP page

 
Thiru kumaran M
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all !!!

I am displaying the data from iterating an array list and a hash map in a JSP page. Hash map contains four key-values - Employee Id, Employee name, Salary, Date of Joining. I have to provide a link to download the data displaying in JSP in CSV format. Just the table with Employee Id, Name, salary and date of joining are displaying fine. But how to provide option to download and how to initiate the download in comma separated value format?
can you make me clear with example ?
Also, how to get every Employee ID alone in and assign it to a script variable. I have to pass it to query string.

can any one help me please ??

Thanks in advance.. !!!
 
Joe Ess
Bartender
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thiru kumaran M wrote: But how to provide option to download and how to initiate the download in comma separated value format?
can you make me clear with example ?


I'm not sure what you mean here. A URL for a CSV is exactly the same as a URL for an HTML file, JPG image, JSP page and so on.

Thiru kumaran M wrote:
Also, how to get every Employee ID alone in and assign it to a script variable. I have to pass it to query string.


In the CSV?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic