5 Replies Latest reply: Aug 24, 2012 11:40 AM by slowdive RSS

UriInfo always null when using @Context

slowdive Newbie

I did a little bit of searching about this issue, and most places seem to mention RESTEasy. Since this application I am working on needs to be deployable to both Weblogic and JBoss, I am hoping to be able to use java/javax libraries. This is my code:

 

@Context

protected UriInfo uriInfo;

@Context

protected HttpHeaders headers;

 

The headers variable is not null, but uriInfo is... Also, this gets populated correctly when deploying to Weblogic. I am using JBoss AS 7.1.1Final and my deployment is an EAR containing a RAR and 3 WARs.