cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Convenience features for generating HATEOAS urls?
Date Tue, 22 Feb 2011 17:30:04 GMT
Talend Service Factory jaxrs_advanced examples uses it too

On Tue, Feb 22, 2011 at 5:25 PM, Glen Mazza <gmazza@talend.com> wrote:
> Googling getBaseUriBuilder() returns several examples, such as
> http://svn-mirror.glassfish.org/jersey/tags/jersey-0.6/jersey/examples/jMakiBackend/src/java/com/sun/ws/rest/samples/jmaki/resources/PrintersResource.java.
>
> Glen
>
> On 2/22/2011 12:19 PM, Sergey Beryozkin wrote:
>>>>
>>>> JAX-RS UriInfo and UriBuilder is what JAX-RS provides. UriInfo will
>>>> give the base URI builder, ex :
>>>>
>>>> UriBuilder builder = uriInfo.getBaseUriBuilder();
>>>
>>> How do I get that "uriInfo" instance?  The UriInfo class is an interface.
>>>  There are static methods in UriBuilder.
>>>
>> Have it injected:
>>
>> public class Controller {
>> // thread-safe
>> @Context
>> private UriInfo uriInfo;
>> ...
>> }
>>
>> cheers, Sergey
>
>
>

Mime
View raw message