Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些文档位于服务器上的共享文件夹中。我需要通过单击链接打开此文件夹以显示这些文档。我尝试使用<a href="...">,但没有奏效。我不想指向文件夹中的任何特定文件。如果是这种情况,那么它可以工作,但我想要做的是通过单击指定路径的链接来打开这个共享文件夹。
<a href="...">
我可以使用的技术是 html、jsp、javascript、jquery。
请告知如何执行此操作。
使用 Java API 获取文件夹的文件并将每个文件显示为页面上的链接。
File directory = new File("path of shared directory"); File[] files = directory.listFiles();
将页面上的文件显示为链接,因此这将与您当前所做的相同,但它将获取该目录中的所有文件。