What’s the difference between absolute path & relative path when using any web server or Tomcat?
What’s the difference between absolute path & relative path when using any web server
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Absolute paths start with / and refer to a location from the root of the current site (or virtual host).
Relative paths do not start with / and refer to a location from the actual location of the document the reference is made.
Examples, assuming root is http://foo.com/site/
Absolute path, no matter where we are on the site
will refer to http://foo.com/site/foo.html
Relative path, assuming the containing link is located in http://foo.com/site/part1/bar.html
will refer to http://foo.com/site/part2/quux.html
or
will refer to http://foo.com/site/part1/part2/blue.html