dev@jersey.java.net

Support for jsr303 in jersey-server

From: Nicolas Griso <nicolas.griso_at_gmail.com>
Date: Thu, 11 Nov 2010 15:45:47 +0100

Hello,

I'd like to know if there is in jersey-server a support for javabean
validation (jsr 303) for method receiving data in Resource classes?
(I searched but I haven't found anything)

For example, Spring MVC is supporting something like this:
@Controller
public class MyController {
    @RequestMapping("/foo", method=RequestMethod.POST)
    public void processFoo(@Valid Foo foo) { /* ... */ }

Example from: http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/validation.html#validation-mvc
Method parameters can be annotated with @Valid (annotation from the
jsr303) which makes Spring validated the data before calling the
method.

What do you think of this?
Can something similar be implemented in jersey-server?

Thanks a lot.
Nicolas Griso