[Jersey] How to find resources by path?

From: Rafael Nunes Verger <>
Date: Tue, 6 Sep 2011 10:57:06 -0300

Hey guys,

So, I need build a service JSONPService, that must receive all requests that
ends with "/jsonp". This is my first problem.. when I set a path, like
"/users" for some service, I can't receive requests like
"/users/some/thing/jsonp" in JSONPService, is there some priority annotation
to do this ?

The other problem is: if I set JSONPService to receive requests like
"/jsonp/path/to/service", then if "/users/99" results in XML of user with ID
99, "/jsonp/users/99" must result in the same user but with jsonp; So, with
this path I can receive those requests, but I need to get the result for
"/path/to/service" and then set it with JSONP, is there any way to do it ?

Rafael Nunes Verger -- Software Developer