<%
Configuration conf = new Configuration();
URI uri = new URI("hdfs://192.168.0.52:9010");
FileSystem fileSystem = FileSystem.get(uri, conf);
//System.out.println("Hdfs directory is"+"\n");
Path src1 = new Path("hdfs://192.168.0.52:9010/user/hadoop");
FileStatus files[] = fileSystem.listStatus(src1);
Path filePath=null;
for(FileStatus file:files){
//System.out.println(file.getPath());
%>
<p><a href="./out.jsp?filePath=<%=file.getPath()%>"><%=file.getPath()%></a></p>
<%
//out.println("<a href="./out.jsp?filePath=file.getPath()">file.getName</a>");
}
%>