If the folders and files are part of the web app, then if (and only if) the web app is not deployed as an unexpanded war file, you can simply use
Java file I/O to discovers the files and folders in the controller. The getRealPath() can be used to find the relative paths within the web app.
Collect the information into collections and send to the JSP for display using JSTL and EL.