users@jersey.java.net

[Jersey] Re: How can I programatically reigster request methods (GET/POST) without using annotations?

From: Markus Karg <karg_at_quipsy.de>
Date: Tue, 15 Mar 2011 11:39:53 +0100

JAX-RS doesn't specify a way to do so. But you can reach the same target using sub-resource locaters and regex. Provide a root resource which publishes a sub-resource locator on a regex path, covering the complete URI sub-tree. The sub resource locator can then dynamically decide what to return (e. g. 404 not found or a particular dynamically created instance of another resource. That other resource can then react on any method it likes. So in the end you get what you need.

 

From: Viggo Navarsete [mailto:viggo.navarsete_at_gmail.com]
Sent: Dienstag, 15. März 2011 11:35
To: users_at_jersey.java.net
Cc: Daria Knyazeva
Subject: [Jersey] Re: How can I programatically reigster request methods (GET/POST) without using annotations?

 

why would you do that? What is the use case?

On Tue, Mar 15, 2011 at 10:51 AM, Daria Knyazeva <dashaa2_at_gmail.com> wrote:

The question is in the subject.

Thanks for the responding!

--
View this message in context: http://jersey.576304.n2.nabble.com/How-can-I-programatically-reigster-request-methods-GET-POST-without-using-annotations-tp6172141p6172141.html
Sent from the Jersey mailing list archive at Nabble.com.