问题
I'm trying to create hyperlinks to open files from network drive G:
(more details here). G:
is mapped as network drive.
- When I deploy the WAR on Tomcat server integrated to Eclipse, it works.
- When I deploy it on the same but standalone Tomcat itself, it doesn't work
I've tried:
- Run Tomcat as
Domain Admin
, which has an access to the location, but without success. - Run it as
Local user
, but check the boxAllow service to interact with desktop
. Also without success.
What's the difference in access between integrated Tomcat and Tomcat itself?
SOLUTION:
- Case Eclipse + Tomcat: Path
G:/test_dir/test.txt
works - Case Standalone Tomcat: Path
\\\\server\\g\\test_dir\\test.txt
works
回答1:
It is possible that you cannot access shared network drive because account that runs standalone Tomcat does not have enough privileges.
I had a similar issue (running Tomcat as a Windows service) that couldn't access shared network drive because service was running with local admin account that didn't have access to shared network drive.
Since you are on Windows, try running Tomcat as a domain user that has access to a network drive.
回答2:
SOLUTION:
- Case Eclipse + Tomcat: Path
G:/test_dir/test.txt
works - Case Standalone Tomcat: Path
\\\\server\\g\\test_dir\\test.txt
works
来源:https://stackoverflow.com/questions/32987652/links-to-network-drive-doesnt-work-in-standalone-tomcat-but-works-in-eclipset