On 8 Nov 2011, at 21:38, Jeremy Johnson wrote: > Hello list, > > I’m looking for guidance on the best approach for implementing a RESTful > webservice with Jetty. I should start by saying that I’m a veteran .NET > developer, but Jetty and server-side Java development are completely new to > me. I’ve selected Jetty to provide a web API for a new server project as I > needed an efficient embedded webserver with excellent support for the > emerging Websocket standard. > > In addition to Websocket support, the web API exposed by my server needs to > be RESTful. In looking around, I can find a few older examples of REST > frameworks such as Jersey or RESTlet with Jetty, but these are few and in > general there seems to be little discussion of RESTful web services with > Jetty. I’ve been leaning towards Jersey, but the relative lack of examples > makes me wonder if I should be considering something else. > > Any insights would be most welcome. (I also wouldn’t turn down any example > code, as I’m still seeing some errors with the samples I’ve found using older > versions of Jersey and Jetty). > > Thanks! > Jeremy >
Jeremy, We use Jetty and Jersey for our primary REST API and you're right, there's not much by way of examples. We've pieced together a handful of techniques, including some nifty little bits like determining the response type by the file extension of the request and so on. The Jetty setup is actually quite simple, Jersey takes care of a lot of the automatic configuration & service discovery etc. We're actually very happy with the pairing, we've been using it for almost two years now and we haven't hit any limitations. I'm happy to show you as much of our code as I can, if you have an idea of where you'd want to start? Martin
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
