users@jersey.java.net

[Jersey] Resource-level filters and parameters

From: Cemo Koc <cem.koc.fwd_at_gmail.com>
Date: Fri, 11 Dec 2009 03:27:46 -0800 (PST)

Hi all,

I am planning to use with an impl of JSR-303 with my Jersey service. Last
month Jersey started to support formbean perfectly thanks to Paul. (you can
check
1.1.5-ea-SNAPSHOT)

Now after injections occured, I would like to obtain injected parameters
with my filter. And a result of this I can easily validate with JSR-303.

Shortly,

    public class AccountBean {

          @FormParam("acc.type")
          @NotNull
          private Integer type;
   }


   @POST
   @Path("live")
   @Consumes({MediaType.APPLICATION_FORM_URLENCODED})
   @Produces({MediaType.TEXT_HTML})
    public Template postLive(@Inject AccountBean account) {

   //............
   }


I just want to validate my injected bean with a resource filter. In case a
validation error, a 4xx error could be returned... How can I do that? Paul?
:)

Thanks
-- 
View this message in context: http://n2.nabble.com/Resource-level-filters-and-parameters-tp4150694p4150694.html
Sent from the Jersey mailing list archive at Nabble.com.