I have currently a JSP page with a list of files and I would like download each file by a click on this name in the list. My JSP code :
<c:forEach var="listFiles" items="${listFiles}" varStatus="status">
<span id="file-${status.index}" class="files">
<a href="Download">
<c:out value="${listFiles[status.index]}"></c:out>
</a>
</c:forEach>
I found a function for my servlet which run but it's a simple example where we give the path file to the servlet and I would I want this code be generic. How to give each path file to the servlet ?