users@jersey.java.net

[Jersey] Re: Putting simple web interface to jersey REST endpoint

From: ManiKanta G <go4mani_at_gmail.com>
Date: Mon, 19 Dec 2011 12:32:37 +0530

you could do that using
Viewable<http://jersey.java.net/nonav/apidocs/1.1.0-ea/jersey/com/sun/jersey/api/view/Viewable.html>
 we
are serving the html response for html mime type by having a generic
resource method in super class

see
http://blog.docuverse.com/2009/08/04/using-jsp-with-jersey-jax-rs-implementation/

http://stackoverflow.com/questions/3361877/jersey-viewable-with-status-code


ManiKanta G
twitter.com/ManiKantaG


On Sat, Dec 17, 2011 at 11:39 PM, Farrukh Najmi <
farrukh_at_wellfleetsoftware.com> wrote:

> Hi Guys,
>
> My jersey based REST endpoint serves resources in their native XML format
> when default or in JSON format when application/json mediatype is
> specified. Things are working pretty well.
>
> I would like to add a simple Web interface for human access to my REST
> endpoint and was thinking that I could add support for mediatype text/html
> in my endpoints resource methods via @Produces.
>
> What I am not sure of what is the best way to do this in jersey. Jersey
> support JSON format without any help from my code so I assume there is a
> global filter somewhere to transform XML to JSON. I am looking to do
> similar with HTML. Thanks for any guidance on this.
>
> --
> Regards,
> Farrukh
>
> Web:http://www.**wellfleetsoftware.com <http://www.wellfleetsoftware.com>
>
>