tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rutledge, Aaron" <ARutle...@5prime.com>
Subject directory listing null through JSP
Date Fri, 13 Sep 2002 17:00:57 GMT
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 file 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>


Mime
View raw message