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 ...

  • Have you tried to solve the problem? - alexandr gaiduchok
  • Options for the car: from js, which forms the required format, to the state-less server, which receives these pages back in the post request and spits out the file. Everyone decides how he wants .... Well, as it is easier, respectively - Tachkin
  • No, I didn’t try to solve it this way. This is a very modest one, I would like to get at least links to examples of solutions to such issues. Googling on key leads either into the wilderness of thin matters or for examples that I won’t help me ... - Aeroua

0