users@jersey.java.net

Re: [Jersey] _at_ImplicitProduces and priorities <was> Re: [Jersey] prioritising HTML representations in web applications when using implicit or explicit views

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 02 Apr 2009 14:14:13 +0200

On Apr 2, 2009, at 1:39 PM, James Strachan wrote:

> 2009/4/2 Dusan Hornik <dusan.hornik_at_atlassian.com>:
>> Paul Sandoz wrote:
>>
>> Hi,
>>
>> Perhaps there are other ways we can improve this as well.
>>
>> e.g. @Produces on a template processor?
>>
>> Template Processor can be used to generate multiple formats html,
>> json, etc
>> so it's probably not a good idea.
>
> You could always list the full list of all the possible mime types you
> can produce - with whatever weighting you wish (e.g. to weight HTML
> above XML etc).
>
> Or maybe use a wildcard to avoid listing all the thing you can produce
> but just weight what you prefer to generate?
>
> @Produces("text/html;qs=5, */*")
>

s/_at_Produces/_at_ImplicitProduces

?

Paul.