1. Open URL with a query string, i.e. 127.0.0.1:8080/?test=123 2. Observe %q output to access log: test=123.
AccessLogHandler's javadoc says:
%q - Query string (prepended with a '?' if it exists, otherwise an empty string
The query string does not get prepended with a question mark if it exists.