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?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!