If I try to use a relative path (for example just ./) it lists the contents of the directory that the tomcat server is running in rather than the directory of the jsp file and if i use an absolute name http://localhost:8080/ it comes back with nothing in the list.
File dir = new File("./");
String[] children = dir.list();
if (children != null) {
for (int i=0; i<children.length; i++) {
String filename = children;
out.println(filename);
}
}>
Running on a local tomcat server i want to view files in any directory from http://localhost:8080/. This is where the jsp file is on the website. On the computer it's in the webapps/ROOT/ directory of the tomcat server.
If I use the relative path ./ it puts me in the base directory of the tomcat server and if I use the absolute path http://localhost:8080/ it returns nothing.