|
From: Bill B. <bb...@re...> - 2013-07-15 12:13:56
|
You want to generate a URL? Look at UriBuilder. It has methods for passing in a Class and/or a Java method. It will look for @Path annotations and add to the URI path as needed. On 7/15/2013 7:32 AM, Sushil Kr. Vishwanathan wrote: > Hello: > I am trying to implement proper HATEOS using Resteasy as my framework of > choice. However, I am encountering situations where I am manually having > to hard-code links instead of calculating them from the JAX-RS classes > themselves. As an example, let us say I have a root resource /a which > has a sub-resource /b which in turn has a sub-resource /c. So the full > path to C is /a/b/c. Now from another resource D, I want to create a > link to C as part of my response representation but I am not able to > find the full link to C without hard-coding the same. How do I implement > this? > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |