Tomcat DoucmentRoot is set to a virtual file system we developed, such as /mnt/virtualFs
Java web applications through the file system to create a file, such as File w = new File ("/mnt/virtualFs/test.jpg") finished then close the file, the direct use of the local file system to read the file succeed, such as the File r = new File ("/mnt/virtualFs/test.jpg")
But if you use the Tomcat URL to read the file failed, such as URL url_r = new URL ("http://mnt_ip/test.jpg")
If the hard disk file system is used as DocumentRoot, there is no such problem. What's the reason?