users@jersey.java.net

[Jersey]

From: Dário Abdulrehman <dario.rehman_at_gmail.com>
Date: Mon, 14 Sep 2009 16:20:11 +0100

Hi,
I would like to add make my web services available using the usual
http:/<host>/service.<format>
Where format is one of json, xml or rdf.
I am aware that I can use the @Produces annotation and use the accept header
parameter but I also want to provide a more convenient alternative, as it is
common practice.

I tried the following @Path("service{returntype: [\\.json|\\.xml|\\.rdf]}")
and then in the request method I check the returntype to see how do I return
the response.
But this doesn't work. What is the correct way to accomplish this?

Thanks