JSP application. Getresourcepaths() method: returns all files in the specified directory

getResourcePaths(String path)

Example

<%
  Set set = application.getResourcePaths("/");  //返回装载指定路径列表文件名的Set对象
  for(Iterator it = set.iterator();it.hasNext();){  //循环遍历文件名集合对象
  out.print(it.next()+"<br>");  //输出集合中对象的名称
  }
%>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>