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
Don't use @Context in your Application but in a Resource class.
@Context
@Path("/foos") public class FooResource { @Context ServletContext ctx; @GET public Response getFoos() { return Response.ok().build(); } }