Reputation: 5469
So I have a Jersey REST service and I need to get access to a ServletConfig so that I can pull a param out of the web.xml. I can use @Context to wire one in but I don't think it will get me the params I need. Only the ones in the ServletContext.
Any ideas? I'm new to Jersey and this Provider isn't a Servelet. Perhaps I should start with trying to retrieve the servelet?
Upvotes: 0
Views: 320
Reputation: 1901
@Context: annotation can be used to inject the following classes
HttpServletRequest
HttpServletResponse
ServletContext
ServletConfig
WebConfig.
onto a root resource, provider and Application classes.
Upvotes: 2