package com.webCacth.struts.action;import java.io.*;
import java.net.URI;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;public class TreeAction extends Action {

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {

try {
URI uri = new URI("http://localhost/webCatch/protected/xing/news");

File file = new File(uri);
String[] fileList = file.list();
for (int i = 0; i < fileList.length; i++) {
System.out.println(fileList[i]);
} } catch (Exception e) {
e.printStackTrace();
}
return null;
}
}运行以上代码会报异常:java.lang.IllegalArgumentException: URI scheme is not "file",文件的位置是对的,但问题可能出在URI上,FILE(URI uri)这个构造器也有。这个问题怎么解决?