aspose file tools*
The moose likes Struts and the fly likes Use download link to get data in CSV format in JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Use download link to get data in CSV format in JSP page " Watch "Use download link to get data in CSV format in JSP page " New topic
Author

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

Thiru kumaran M
Greenhorn

Joined: Mar 17, 2010
Posts: 3
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

Joined: Oct 29, 2001
Posts: 8971
    
    9

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?


[How To Ask Questions On JavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Use download link to get data in CSV format in JSP page