users@jersey.java.net

Re: [Jersey] Log warnings

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 11 Jan 2010 10:26:20 +0100

On Jan 10, 2010, at 11:39 AM, orid wrote:

>
> Hi,
>
> I am using a servlet filter in front of jersy servlet. The filter
> consumes
> the request form params.
> In the server log I am getting:
> A servlet POST request, to the URI <URI>, contains form parameters
> in the
> request body but the request body has been consumed by the servlet
> or a
> servlet filter accessing the request parameters. Only resource
> methods using
> @FormParam will work as expected. Resource methods consuming the
> request
> body by other means will not work as expected.
>
> My questions:
>
> 1. What exactly this warning mean? If the filter is read-only it
> would be
> safe to do that right?

It should be safe. The log error is informing the developer there is a
restriction in processing the request entity, because that entity has
already been consumed by the servlet layer.


> 2. Is there a way to suppress this warning? It really clogs my logs.
>

You can turn off logging for that class. But when i get a chance i
will modify the code so that this exception only gets logged when
tracing is enabled.

Paul.