users@jersey.java.net

Setting server preferred media type

From: Tim Williams <williamstw_at_gmail.com>
Date: Tue, 15 Jun 2010 14:45:34 -0400

I'm wondering how to indicate the server preferred
representation/Media Type when the client's */* preference hits?
Suppose, I have something like:

@GET
@Produces("application/xml")
public Object getAsXml()...

@GET
@Produces("text/plain")
public Object getAsText()...

@GET
@Produces("text/html")
public Object getAsHtml()...

If a client sends Accept: */* (e.g. curl http://example.com --header
"Accept: */*"), Jersey chooses the application/xml representation.
How do I indicate that the server default should be text/html? It
seems to prefer application/xml in all cases I could find.

Thanks,
--tim