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.
I am in China.so do not mind my poor English.
firstly,i have solved this question before.
there is a way:
1.open Tomcat install folder: ---%TOMCAT_HOME%\conf\server.xml
between :<host> </host> add
2.then start up Tomcat again, interhttp://localhost:8080/FolderTest/1.jsp you can see , it is done