Share this page 

Get a list of directories for JSPTag(s): Servlet/JSP


<h1>Directories</h1>
<ul>
<%
String root="c:/Repository/WebApplication/mydocs/javadoc/";
java.io.File file;
java.io.File dir = new java.io.File(root);

String[] list = dir.list();

if (list.length > 0) {

for (int i = 0; i < list.length; i++) {
  file = new java.io.File(root + list[i]);
  if (file.isDirectory()) {
  %>
  <li><a href="javadoc/<%=list[i]%>" target="_top"><%=list[i]%></a><br>
  <%
     }
  }
}
%>
</ul>