Instead of using getAbsolutePath, use getCanonicalPath when adding contexts for serving local directories. getCanonicalPath traverses symlinks, while getAbsolutePath doesn't.
Serving something across a symlink is frowned upon by jetty. So it's recommended to use the canonical paths to add context for statically serving files.
Instead of using
getAbsolutePath
, usegetCanonicalPath
when adding contexts for serving local directories.getCanonicalPath
traverses symlinks, whilegetAbsolutePath
doesn't.Serving something across a symlink is frowned upon by jetty. So it's recommended to use the canonical paths to add context for statically serving files.