Talend Service Factory jaxrs_advanced examples uses it too
On Tue, Feb 22, 2011 at 5:25 PM, Glen Mazza <[email protected]> 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 > > >
