Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Updating SSL keystore


On Thu, Feb 9, 2017 at 10:46 AM, John English <john.foreign@xxxxxxxxx> wrote:
> On 08/02/2017 16:38, Simone Bordet wrote:
>> Have you thought using WatchService ?
> Great idea, I wasn't aware of this... thanks!
> Now all I have to do is find the pathname of the keystore file so that I can
> watch it...
> But, as I said, my current problem is that getKeyStorePath() just returns
> null.
> Any ideas?

You cannot extract server information from within a webapp, so your
solution of using a ServletContextListener will not work.

What you need to do is to customize the server configuration.

You can create a subclass of org.eclipse.jetty.util.PathWatcher, and
instantiate that in a Jetty XML file that you reference from a custom
Jetty module.

I know it's a bit vague, I'll try to find some time to whip up a
complete example and document it.
See also

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.

Back to the top