Links to network drive doesn't work in standalone Tomcat, but works in Eclipse+Tomcat

夙愿已清 提交于 2019-12-24 13:49:43

问题


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 box Allow 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!