users@jersey.java.net

[Jersey] Global Configuration in ServletContext?

From: Robert Naczinski <robert.naczinski_at_googlemail.com>
Date: Thu, 24 May 2012 22:40:28 +0200

Hello,

I have similar problem like this
http://stackoverflow.com/questions/2942584/jersey-servletcontext-and-resource-loading-on-startup
.

I want to configure something when the application starts and then
access the global configuration in my resources.

I would build now a Context Listener, then add my configuration in
ServletContext. Then I could use in every resource this configuration
from ServletContext.

Is that the best way to JAX-RS and Jersey? Is there a best practice in
Jersey for this problem?

Can someone give me a hint or snippet?

Regards,

Robert