jsp

<%
String path=request.getRealPath("/");
String path_temp=path+"temp";
File file1=new File(path_temp);
File fileList[]=file1.listFiles();
%>
文件夹为:<%= path_temp %>
<br />
文件夹中的文件包括:
<%
for(int i=0;i<fileList.length;i++)
{
  String strname=fileList[i].getName();
  out.println(strname);
%>
<%=fileList[i].getName() %><br />
<%
}
%>
分开写
posted on 2008-04-19 10:31  小顾问  阅读(204)  评论(0)    收藏  举报