users@jersey.java.net

Re: [Jersey] Re: dynamic JAXB marshalling

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 27 Apr 2010 09:45:22 +0200

On Apr 26, 2010, at 5:51 PM, aloleary wrote:

>
> Does the new ViewProcessor address the issues with obtaining
> reference to the
> MediaType:
>
> http://jersey.576304.n2.nabble.com/Jaser-Reports-PDF-td3254543.html#a3648606
>
> Or have any new mechanisms appeared in 1.2.x
>

Using a ViewProcessor it is now possible to resolve to an object
specific to the processor, as of 1.1.5.

No new mechanism was added w.r.t. media types you need to still inject
the following onto your ViewProcessor:

   @Context HttpContext hc;

and do:

   MediaType mt = hc.getResponse().getMediaType();

Hth,
Paul.

> Thanks
> -A-
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Deprecated-TemplateProcessor-Use-ViewProcessor-tp4231771p4963299.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>