Given:
1) There is a web application that rakes out a pack of values from the database and displays the list on the page
servlet.java:
List<String> result; result =collectionMy.distinct("param2").query("param1:'somevalue1'}").as(String.class); index.jsp:
<table> <tr> <th> <c:forEach var="result" items="${result}"> ${result} <br> </c:forEach> </th> </tr> </table> Question: how to use this application to organize the preservation of table values to a file? Important:
1) generate a file at an event on the page - for example, click a button or a link and suggest that the user save it at home. I thought about this option:
2) create a file by event and display a button / link to download and delete
1) and 2) options are suitable ...