bookmark

Overview of JAX-RS 1.0 Features - Jersey: RESTful Web services made easy - wikis.sun.com


Description

@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();

}

Preview

Tags

Users

  • @kw
  • @denverblair

Comments and Reviews