tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Symonds" <>
Subject listFiles() 500 errors
Date Mon, 11 Feb 2002 19:10:06 GMT


We have tomcat installed and everything looks to 
be OK (all of the examples work fine, and all of 
our pages compile fine), except for one page which
makes a call to listFiles().

Here is the code snippet:


 String ch = String.valueOf(request.getQueryString());
 File myfile = new File("/uploadedir/");
 File file[] = new File[200];
 file = myfile.listFiles();
 String str = "";


And here is the error message:

Error: 500
Location: /servlets/alphaOrder.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile 
Found 1 semantic error compiling "/var/cache/tomcat/DEFAULT/ROOT/servlets/":

   116.                     file = myfile.listFiles();
*** Error: No method named "listFiles" was found in type "java/io/File".

at org.apache.tomcat.facade.JasperLiaison.javac(Unknown Source)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(Unknown Source)
at org.apache.tomcat.facade.JspInterceptor.requestMap(Unknown Source)
at org.apache.tomcat.core.ContextManager.processRequest(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at Source)
at org.apache.tomcat.util.threads.ThreadPool$ Source)

... we're stumped because everything else is working fine,
and if we comment out just that one line, it will work without
the error message (but without listing the files, ofcourse).

The server is debian woody running a standard install, up
to date as of a few minutes ago.



To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message