Writing struts jsp output to csv/xls

I have a struts jsp page which shows up a table with some data. I would like to have a button like 'Write CSV' or 'Write excel' in the same page, to write the table content as csv/xls file in the client machine. Please help me with the idea and write logic(without javascript).
Who is Participating?
Samuel LiewConnect With a Mentor Commented:
This type of operation cannot be done using JavaScript. It has to be done on the server-side, and the output file downloaded to client.
ganeshaneeshAuthor Commented:
I understand, but I expect sample code.
Samuel LiewConnect With a Mentor Commented:
There are many libraries available which read/write CSV files. You can try these:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.