Absolute path & Relative Path

前端 未结 3 1808
太阳男子
太阳男子 2020-11-28 14:49

What\'s the difference between absolute path & relative path when using any web server or Tomcat?

3条回答
  •  青春惊慌失措
    2020-11-28 15:04

    Through trial and error I have determined that the starting point of a path in Tomcat is the webapps folder.

    In other words if your Java code is trying to read ../somefile.txt then the absolute path to that file would be %TOMCAT_HOME%/webapps/../somefile.txt i.e. %TOMCAT_HOME%/webapps/somefile.txt

提交回复
热议问题