tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Brazhnyk <a.brazh...@biconsulting.ws>
Subject RE: listFiles() 500 errors
Date Tue, 12 Feb 2002 09:50:11 GMT
Hi,

Check the version of JDK you use, File.listFiles() is marked "since 1.2"


Hope it helps.
Anton

> -----Original Message-----
> From: Mark Symonds [mailto:mark@symonds.net]
> Sent: Monday, February 11, 2002 9:10 PM
> To: tomcat-user@jakarta.apache.org
> Subject: listFiles() 500 errors
> 
> 
> 
> 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".
> 
> 
> ... 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