Could anyone please provide the example how to pass the application deployment
attributes (that I set up when rest application starts) to the concrete JAX-RS
Resource.
Example:
I want to provide the parameter to my JAXRSApplication
// create JAX-RS runtime environment
Context c = comp.getContext().createChildContext();
c.getParameters().add("key", "value");
final JaxRsApplication application = new JaxRsApplication(c);
And later I want to get the access to them in Resource
@Path("path")
public class WeaveVersionResource {
@Context org.restlet.Context
{
System.err.println(context.getParameters().getFirstValue("key"));
}
When execute this code, it states that "class org.restlet.Context must not be
annotated with @Context"
How can I access these values? I assume I may need to register (use)
javax.ws.rs.ext.Providers for this purpose, but don't know how.
If I would play with standard (regular) restlet I will have "MyResource extends
Resource" and will use inherited getContext() for this purpose.
Thus any example how to do this with JAX-RS is needed.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1059618