Could you possibly explain how I can get the ServletContext instance in my Application\'s sub-class? Is it possible? I have tried to do it like in
ServletContext
Application
Since Jersey 2.5, ServletContext can be injected directly in constructor: https://java.net/jira/browse/JERSEY-2184
public class MyApplication extends ResourceConfig { public MyApplication(@Context ServletContext servletContext) { // TODO } }