使用 Eclipse 通过 JSP 上传图像后,我无法获取 webContent 文件夹中的更改。对于这些更改,我必须刷新 webContent。上传后如何刷新文件系统或如何显示图片?
最佳答案
您可以使用WatchService
A watch service that watches registered objects for changes and events. For example a file manager may use a watch service to monitor a directory for changes so that it can update its display of the list of files when files are created or deleted.
关于java - 使用java刷新文件系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15944326/