tomcat-users mailing list archives

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

Hi, 

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());
 try{
 File myfile = new File("/uploadedir/");
 File file[] = new File[200];
 file = myfile.listFiles();
 String str = "";
 if(ch.equals("all"))

[...]

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/alphaOrder_1.java":

   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 org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java)


... 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.

TIA,

-- 
Mark



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message