users@jersey.java.net

[Jersey] How to get a Resource's URI (not the request URI)

From: gili.tzabari <gili.tzabari_at_gmail.com>
Date: Tue, 27 Nov 2012 22:09:34 -0500

Hi,

     I know UriInfo returns the URI associated with a request, but how
can I return the URI associated with a certain sequence of resource
construction? Meaning, what happens if a user requests:

/companies/{id}/users/{name}

     and I am in /companies/{id} without having yet delegated to a
sub-resource for "/users". How do I get the current URI? Similarly, I'd
like to construct a resource manually (by injecting it or using new)
then getting its URI. Can this be done?

Thanks,
Gili