-
1. Re: Can not inject HttpServletRequest object using @Context in jersey class in wildfly-8.2
nickarls Jun 21, 2016 5:29 PM (in response to pramanish)Hmm. What is the FQCN of the Context annotation? Perhaps it's supposed to delegate to the CDI provided http artifact but anways it looks like it gets hit before the CDI contexts have been set up. What jars are included in your deployment?
-
2. Re: Can not inject HttpServletRequest object using @Context in jersey class in wildfly-8.2
jamezp Jun 21, 2016 7:01 PM (in response to pramanish)As asked on cdi - Can not inject HttpServletRequest object using @Context in jersey class in wildfly-8.2 - Stack Overflow. How did you install Jersey? By default WildFly uses RESTEasy for it's JAX-RS implementation.
--
James R. Perkins
-
3. Re: Can not inject HttpServletRequest object using @Context in jersey class in wildfly-8.2
pramanish Jun 22, 2016 9:17 AM (in response to nickarls)I have included jersey-core, jersey-json, jersey-server and jersey-servlet in pom.xml. All are versiond at 1.19
-
4. Re: Can not inject HttpServletRequest object using @Context in jersey class in wildfly-8.2
jamezp Jun 22, 2016 12:23 PM (in response to pramanish)If you want Jersey to interact with the container you need to install it as a module and remove the current JAX-RS subsystem. I'm not sure exactly how this would work, but Jersey would need to be managed by the container if you want CDI to work.
I'd advise using the JAX-RS API instead of Jersey specific components. Then the implementation won't matter.
--
James R. Perkins