我确信这很简单,但我通常使用 PHP,并且很难适应 JSP。我只需要文件名,但我收到下面列出的错误
File jsp = new File("/home/www/contents/testing/images/thing");
String f = "";
File[] list = jsp.listFiles();
for(int i=0;i<list.length;i++)
{
f = list[i].split("/");
out.println(f[6]);
}
Tomcat错误:
The method split(String) is undefined for the type File