Showing results for January, 2010 (archive)

Control JAX-RS Content Negotiation with Filters

Comments Off January 18th, 2010 by Henri Bezemer

JAX-RS supports very sophisticated content negotiation, built around the HTTP accept header and the @consumes and @produces annotations. Unfortunately some (potential) RESTful clients are not so sophisticated. Try your webbrowser for instance. It is not always easy or even possible to set the HTTP accept header to the desired value. In this post I’ll present a simple Filter (javax.servlet.Filter) that dynamically adds HTTP accept headers to your requests, based on a predefined URI pattern. It has been tested with the Jersey implementation of JAX-RS. Read more…

Put JAX-RS to work with Adobe Flex

1 Comment » January 13th, 2010 by Henri Bezemer

In my previous post I’ve shown how to build a simple set of RESTful services with JAX-RS, and how to access those services¬†from a XForms client. That example also showed the RESTful principle of HATEOAS. In this post I’ll show how to build a Adobe Flex 3 client to those services. Read more…

HATEOAS by Example

3 Comments » January 7th, 2010 by Henri Bezemer

Hypermedia as the Engine of Application State (HATEOAS) is a very useful concept in the RESTful architectural style. The best way to show the benefits of HATEOAS is by giving an example. In this post I’ll be using the Jersey JAX-RS framework to build three RESTFul services. By mixing XForms into the equation, these services form a complete (yet tiny) web application. The¬†example can be deployed on GlassFish. Read more…