You should be able to do:
<td><c:out value="${currentFile.canonicalPath}"/></td>
If contents
is, indeed, a List
of File
.
Also, there's no specific reason to populate the Session
, via the request.getSession()
. You can place your data directly in to the request as an attribute using request.setAttribute(...)
.
For truly transient data just for the JSP, this is a better place. Putting things in the Session has scope beyond the current request. (If that's intentional, no big deal, just an FYI.)