The StarLux is a unique home base for your Jersey Shore vacation with amenities and services expected by discerning guests. Enjoy concierge service, free bicycle usage, the most exciting pool in the Wildwoods and much more to make your stay the ultimate vacation.
@Produces("image/*")
public Response getImage(@PathParam("image") String image) {
File f = new File(image);
if (!f.exists()) {
throw new WebApplicationException(404);
}
String mt = new MimetypesFileTypeMap().getContentType(f);
return Response.ok(f, mt).build();
}
Representational state transfer (REST) was introduced in early 2000 by Roy Fielding's doctoral dissertation. However, in the Java community, it was not standardized until JSR 311(JAX-RS) was finalized in 2008. The first release of its reference implementation is even later. In this article, I introduce Jersey, which is the reference implementation of JSR 311, by describing its essential APIs and annotations. I'll also show you how you can smoothly transfer from servlet-style services to RESTful services by integrating Jersey into Apache Tomcat.