I need a means to determine the real path from my WS-RS client.  I use Wink as 
my framework.  I have done this is in a regular HTTPServlet using the 
ServletContext getRealPath method.  But, I can't find a way to do within my 
WS-RS class..  I found one example for using the Resource annotation, but that 
does not seem to work.  When I run the context member is null.

My code looks like:

@Resource
private WebServiceContext context;
:
ServletContext servletContext = (ServletContext) 
context.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
String libPath = servletContext.getRealPath("/WEB-INF");

But context appears to be null.

If anyone has alternative method, or knows what is wrong the above, any 
suggestion would be appreciated.

Thanks.

-Steve

Reply via email to