<%@ page import="java.io.*" %>
Index of Files
Index of Files
<%
String file = application.getRealPath("/");
File f = new File(file);
String [] fileNames = f.list();
File [] fileObjects= f.listFiles();
%>
<%
for (int i = 0; i < fileObjects.length; i++) {
if(!fileObjects[i].isDirectory()){
%>
"><%= fileNames[i] %>
(<%= Long.toString(fileObjects[i].length()) %> bytes long)
<%
}
}
%>