posted 10 years ago
I have a servlet-based JAX-RS example:
When the client connect to this get method using user name as john, the output on the server is:
INFO: GET students/{studentId} [studentId=13005529]
INFO: User principal name injected from @Context security context :john
INFO: Web service context is null.
Obviously, @Context can inject the security context which contains john as the user principal.
But, I think @Resource WebServiceContext only works for JAX-WS service , not JAX-RS service. The WebServiceContext injected is null.