Hi List,
I hope I am not double posting--my last e-mail bounced.
I am trying to create a JSP page that lists contents on a network filesystem. I am creating
a file object using
File dir = new File("//FILESERVER/Public_Folder");
and then I want to list all of the files using...
File[] children = dir.listFiles();
if (children == null) {%>
Either dir does not exist or is not a directory
<%} else {
for (int i=0; i<children.length; i++) {
but "children" will only return null even though the directory has subfiles! I have run the
same piece of code in the main method of an application and it works perfectly. Why would
this cause problems in TomCat? Is it a security access issue? Is there a way to overcome
this? I have been stuck on this simple problem for weeks! Any help greatly appreciated.
Regrads to all, Aaron
BTW: When I replace the network path with a local path it works fine.
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
|