Tags

,

links:
http://www.infoq.com/articles/springmvc_jsx-rs
http://docs.oracle.com/cd/E19226-01/820-7627/6nisfjmk8/index.html

summary:
– spring vs jax-rs, mostly same concept utilizing annotation

– main difference is: spring mvc default method to return view or view name (spring)
vs returning body instead of using @ResponseBody (jersey)

– web.xml servlet-class: org.springframework.web.servlet.DispatcherServlet (spring)
vs com.sun.jersey.spi.container.servlet.ServletContainer (jersey)

– @RequestMapping (spring) vs @Path (jersey)
– @RequestMapping(method=RequestMethod.GET) (spring) vs @Get (jersey), etc
– @PathVariable (spring) vs @PathParam (jersey)
– @RequestVariable (spring) vs @QueryParam (jersey)
– @ResponseStatus (spring) vs get/set response via @Context (jersey)
– @RequestBody (spring) vs method(String input) (jersey) ?
– @ResponseBody (spring) vs method return type (jersey)
– @ExceptionHandler (spring) vs @Provider and ExceptionMapper interface (jersey)
– @RequestMapping(headers=…) (spring) vs @Produces, @Consumes (jersey)

– Jersey @Consumers, if a resource is unable to consume the MIME type of a client request, the Jersey runtime sends back an HTTP 415 Unsupported Media Type error.

Advertisements