I have followed the tutorial to create a web service (Developing REST Web Services Tutorial). This works as expected and I have a restful web service working. To build my service properly (initialize) I need access to the ServletContext to access the path to WEB-INF and resources I need there.
I tried adding @Resource WebServiceContext wsContext; to then use the wsContext to access the ServletContext but the wsContext is always null.
It would appear this is not the correct approach. What is the best way to resolve this and get the access I need?
Thanks in advance