as already stated this won't work for an OSGi Servlet Container.
All of the deployment together with those information are handled by Pax Web.
Jetty is just the mere container to run the stuff.
To retrieve the actual ServletPath you will need to call request.getServletPath()
But, this will not solve your problem. You need to be aware that since you are running in Karaf
some things do work different here. So an access to the deployment directory is not possible.
Since there is no such deployment directory.
So for your exact use-case one possibility would be to use an extracted war in the deploy folder, which isn't nice
but could work.
From an OSGi perspective I'd suggest using a fragment bundle for your configuration file, that is why the fragment bundle have been invented for, and attach this to your WAB.
Another possibility, use the configuration admin Service for the custom configuration, with this solution you'll need to alter your
wab a bit though, to get a hold of the configuration.