users@jersey.java.net

[Jersey] Re: Accessing the request body in a filter to Sanitize

From: Martin Matula <martin.matula_at_oracle.com>
Date: Sat, 16 Jun 2012 00:42:35 +0200

On Jun 15, 2012, at 11:59 PM, dehru2_at_yahoo.com wrote:

> Hello,
> I am trying to sanitize user input from the client. I have implemented
> a filter and can access the query parameters to clean them. But we
> have some forms that submit json in the post body. How can I access
> the body in the filter to clean the post body before we process the
> post body in the handler methods?

ContainerRequest has get/setEntity() and get/setEntityInput/OutputStream() methods you can use.
Regards,
Martin