Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (13 sloc) 945 Bytes

Jetty Extras

Serving Resources from a relative path

Sometimes you may want to serve resources from a relative path, for example a sibling directory located at ../client. But paths containing .. are considered aliased and Jetty disallows these by default, as described in this policy.

If you've evaluated the security risks described in the link above and wish to enable aliases in paths, you can do so with allowAliases(true), eg:

@@snip { #example1 }

Enabling Request Logs

Jetty can be configured to log all requests in Common or Extended formats with requestLogging. This is a global, not per-context, setting. At minimum you need to specify where to log to:

@@snip { #example2 }